@@ -24,8 +24,8 @@ class in your controllers to manage the profiler programmatically::
24
24
public function someMethod(?Profiler $profiler)
25
25
{
26
26
// $profiler won't be set if your environment doesn't have the profiler (like prod, by default)
27
- if ($profiler !== null ) {
28
- // for this particular controller action, the profiler is disabled
27
+ if (null !== $profiler ) {
28
+ // if it exists, disable the profiler for this particular controller action
29
29
$profiler->disable();
30
30
}
31
31
@@ -40,13 +40,13 @@ create an alias pointing to the existing ``profiler`` service:
40
40
41
41
.. code-block :: yaml
42
42
43
- # config/dev/services .yaml
43
+ # config/services_dev .yaml
44
44
services :
45
45
Symfony\Component\HttpKernel\Profiler\Profiler : ' @profiler'
46
46
47
47
.. code-block :: xml
48
48
49
- <!-- config/dev/services .xml -->
49
+ <!-- config/services_dev .xml -->
50
50
<?xml version =" 1.0" encoding =" UTF-8" ?>
51
51
<container xmlns =" http://symfony.com/schema/dic/services"
52
52
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
@@ -60,7 +60,7 @@ create an alias pointing to the existing ``profiler`` service:
60
60
61
61
.. code-block :: php
62
62
63
- // config/dev/services .php
63
+ // config/services_dev .php
64
64
use Symfony\Component\HttpKernel\Profiler\Profiler;
65
65
66
66
$container->setAlias(Profiler::class, 'profiler');
0 commit comments