The symfony/web-profiler-bundle is a development tool that offers detailed insights regarding the execution of any request. It provides insights helpful in diagnosing, debugging, and optimizing your application. However, it should never be enabled on production servers as it can create major security vulnerabilities in the project.
To integrate the symfony/web-profiler-bundle into your project, you need to include it in your project using composer. You can do so via the following command:
composer require --dev symfony/web-profiler-bundle
After the successful installation of the bundle, you need to enable the bundle for the dev and test environments. In the config/bundles.php
file, ensure the bundle is activated for these environments:
return [
// ...
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true,'test'=>true],
// ...
];
Then you need to import the routing configuration in your config/routes/dev/web_profiler.yaml
:
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler
The WebProfilerBundle's UI is accessible in the browser at path /_profiler.
The symfony/web-profiler-bundle documentation is in the Symfony repository. You can find detailed information regarding the use, suggestions, and issues in this bundle by clicking here. Also, you can report any issues or send pull requests in the main Symfony repository.