Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nowo-tech/TwigInspectorBundle/llms.txt
Use this file to discover all available pages before exploring further.
How configuration is created
The bundle alias isnowo_twig_inspector. Symfony automatically loads any config file that matches this alias:
config/packages/nowo_twig_inspector.yaml(all environments)config/packages/dev/nowo_twig_inspector.yaml(dev only)
config/packages/dev/nowo_twig_inspector.yaml and updates config/routes.yaml. Use --force to overwrite an existing config file, and --env=test for the test environment.
The bundle works without any config file. All options fall back to their defaults from
Configuration.php when no YAML is present.Config options reference
Template file extensions the inspector instruments. Add
.twig if you use bare Twig files.Template names or glob-style patterns to exclude from inspection. Supports
* wildcards.Block names or glob-style patterns to exclude. Supports
* wildcards.Additional exclusion patterns as regular expressions. Applied alongside
excluded_templates.Template name prefixes to exclude, for namespace-style filtering.
Regular expression patterns for block exclusion.
Collect template and block metrics (render counts, timing) in the Web Profiler. Set to
false to reduce collector overhead.When
true, inject inspector comments during sub-requests (e.g. when main content is rendered as a fragment via render(controller(...))). Enable this if all templates show “sub-request” and none get inspected.Name of the cookie used to enable/disable the inspector. Change this if it conflicts with another cookie in your app.
Maximum nesting depth for comment injection.
0 means unlimited. Reducing this can lower overhead on very deep template trees.Visual theme for the overlay popup. Accepted values:
light, dark, auto.auto follows the system prefers-color-scheme setting.Use a compact tooltip style for the overlay popup.
Minimize overlay animations. Set to
true to respect accessibility preferences, or rely on the system prefers-reduced-motion media query.Keyboard shortcut that toggles the inspector (same as the Enable checkbox; reloads the page). Set to an empty string to disable the shortcut.
Full example config
Exclusion patterns
The three exclusion mechanisms can be combined:| Mechanism | Example | Matches |
|---|---|---|
excluded_templates (glob) | 'admin/*' | Any template whose path starts with admin/ |
excluded_templates_prefixes | '@Admin/' | Namespace-style paths like @Admin/dashboard.html.twig |
excluded_templates_regex | '/\.email\.twig$/' | Any path ending in .email.twig |
