Skip to content

Commit 5d2c672

Browse files
committed
feature #18946 [WebProfilerBundle] Document ! operator negating url filter (SzymonKaminski)
This PR was merged into the 6.4 branch. Discussion ---------- [WebProfilerBundle] Document `!` operator negating url filter Added an additional example to the `Accessing Profiling Data Programmatically` section. It documents prefixing the URL filter with `!` to exclude specific URLs and resolves #18943 Commits ------- 833c6a3 [WebProfilerBundle] Document `!` operator negating url filter
2 parents a2163ab + 833c6a3 commit 5d2c672

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

profiler.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,22 @@ look for tokens based on some criteria::
7979
// gets the latest 10 tokens
8080
$tokens = $profiler->find('', '', 10, '', '', '');
8181

82-
// gets the latest 10 tokens for all URL containing /admin/
82+
// gets the latest 10 tokens for all URLs containing /admin/
8383
$tokens = $profiler->find('', '/admin/', 10, '', '', '');
8484

85+
// gets the latest 10 tokens for all URLs not containing /api/
86+
$tokens = $profiler->find('', '!/api/', 10, '', '', '');
87+
8588
// gets the latest 10 tokens for local POST requests
8689
$tokens = $profiler->find('127.0.0.1', '', 10, 'POST', '', '');
8790

8891
// gets the latest 10 tokens for requests that happened between 2 and 4 days ago
8992
$tokens = $profiler->find('', '', 10, '', '4 days ago', '2 days ago');
9093

94+
.. versionadded:: 6.4
95+
96+
Prefixing the URL filter with a ``!`` symbol to negate the query was introduced in Symfony 6.4.
97+
9198
Data Collectors
9299
---------------
93100

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy