8000 Updated the profiler matchers article by javiereguiluz · Pull Request #5593 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Updated the profiler matchers article #5593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Minor rewordings
  • Loading branch information
javiereguiluz committed Aug 3, 2015
commit 00a66879fdcac0cebfc6786e548cdf257e9c85f9
9 changes: 4 additions & 5 deletions cookbook/profiler/matchers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ How to Use Matchers to Enable the Profiler Conditionally
The Symfony profiler is only activated in the development environment to not hurt
your application performance. However, sometimes it may be useful to conditionally
enable the profiler in the production environment to assist you in hard to debug
issues. This behavior is implemented with the **Request Matchers** defined by
Symfony.
issues. This behavior is implemented with the **Request Matchers**.

Using the built-in Matcher
--------------------------

A Request Matcher is a class that compares a pre-defined set of checks against a
given ``Request`` instance. Symfony provides a built-in
A Request Matcher is a class that checks whether a given ``Request`` instance
matches a set of conditions. Symfony provides a
:class:`built-in matcher <Symfony\\Component\\HttpFoundation\\RequestMatcher>`
which matches paths and IPs. For example, if you want to only show the profiler
when accessing the page with the ``168.0.0.1`` IP, then you can use this
Expand Down Expand Up @@ -92,7 +91,7 @@ matcher::
}
}

Then, configure the service and set it as ``private`` because the application
Then, configure a new service and set it as ``private`` because the application
won't use it directly:

.. configuration-block::
Expand Down
0