Symfony2 webprofiler show environment prod

The system in the dev environment will be very slow with jquery, but in my case it is very good, can the webprofiler in the prod environment? greetings and thanks

+4
source share
1 answer

Add this to routing.yml :

 _wdt: resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" prefix: /_wdt _profiler: resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" prefix: /_profiler 

Add this to config_prod.yml :

 web_profiler: toolbar: true 

Change this to AppKernel.php :

Remove $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle() from this statement:

 if (in_array($this->getEnvironment(), array('dev', 'test'))) { // ... } 

and add this to the package array outside the if statement:

 new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle() 

In app.php set debug = true

 $kernel = new AppKernel('prod', true); 

In config_prod.yml add:

 framework: profiler: only_exceptions: false 

That should do the trick.

Remember to do this after making changes to the code:

 $ php ./app/console cache:clear --env=prod --no-debug 
+13
source

Source: https://habr.com/ru/post/1442488/


All Articles