Requirements
| Requirement | Version |
|---|---|
| PHP | >= 8.1, < 8.6 |
| Symfony | ^6.0 | ^7.0 | ^8.0 |
| Symfony Web Profiler Bundle | Required |
| Twig | ^3.8 | ^4.0 |
Install via Composer
Run the following command in your project root. The To pin to the current major version:
--dev flag ensures it is added to require-dev and never installed in production environments.Register the bundle
- With Symfony Flex
- Without Flex (manual)
If you use Symfony Flex and install from Packagist, the recipe runs automatically and:
- Registers the bundle in
config/bundles.php - Creates
config/packages/dev/nowo_twig_inspector.yaml - Adds routes to
config/routes.yamlfordevandtest
Add the bundle routes
Skip this step if you used Symfony Flex — routes are already configured by the recipe.
config/routes.yaml, restricted to dev and test:(Optional) Run the install command
If the Flex recipe did not run (for example, when installing from a private repository or directly from Git), you can use the install command to generate the config file and update routes automatically:This creates
config/packages/dev/nowo_twig_inspector.yaml and updates config/routes.yaml if needed.Additional options:Verify the installation
Clear the cache and open your application:Open any page in the browser with the Symfony Web Profiler toolbar visible. You should see a
</> icon in the toolbar. Click it to open the Twig Inspector dropdown — if it appears, the bundle is installed correctly.For the full usage walkthrough (enabling the overlay, hovering, clicking), see the Quickstart.IDE integration
To enable click-to-open in your IDE, set theframework.ide option in your dev framework configuration. The bundle uses Symfony’s standard %%f (file path) and %%l (line number) placeholders.
| IDE | URL handler |
|---|---|
| PhpStorm | phpstorm://open?file=%%f&line=%%l |
| VS Code | vscode://file/%%f:%%l |
| Cursor | cursor://file/%%f:%%l |
| JetBrains Fleet | fleet://open?path=%%f&line=%%l |
| Sublime Text | subl://open?url=file://%%f&line=%%l |
