All notable changes are documented here. The format follows Keep a Changelog and this project adheres to Semantic Versioning.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.
[Unreleased]
No unreleased changes at this time.1.0.25 — 2026-02-18
Added
- Compiler pass:
TwigPathsPassregisters the bundle’s Twig views path with the native Twig loader so that application overrides intemplates/bundles/NowoTwigInspectorBundle/are consulted first. - Documentation: New
USAGE.mdcovering overview, step-by-step usage, filter, shortcuts, full panel, overriding bundle templates, and troubleshooting. - Tests: Unit tests for
TwigPathsPass(loader resolution and path registration).
Changed
- Dependencies and demo app Composer locks updated; PHP CS Fixer applied.
- Bundle template and service wiring minor updates.
1.0.24 — 2026-02-18
Fixed
- CI: Pin
symfony/consoleto the same major version as the Symfony matrix in the workflow to avoid pulling Console 7.x when testing PHP 8.4 with Symfony 6.4 (caused a fatal error due toDebugCommand::configure()signature mismatch). - Tests: Integration test
testInstallCommandRunsAndCreatesConfigAndRoutesnow usesApplication::addCommand()on Symfony Console 7.0+ and falls back toApplication::add()on 6.4.
1.0.23 — 2026-03-14
Added
- TypeScript tests: Full coverage for the frontend entry point and types. New
index.test.tstests toolbar presence, DOM setup, checkbox and icon click, filter input, keyboard shortcuts (Ctrl+Shift+T,Ctrl+Shift+R, Escape), and bothDOMContentLoadedandreadyStatepaths. - BlockStorage tests: Sort order when a block has Twig then controller template; controller range with a text node before the element.
- Overlay tests:
updateFilterHighlightswhen some blocks do not match the filter;handleBlockClickearly return whentemplateIndexis not set.
Changed
- Coverage: Vitest thresholds set to 100% for lines, statements, and functions; 99.5% for branches.
- Overlay: Click handler logic extracted to
handleBlockClick(event)for testability. - BlockStorage: c8 ignore comments added where v8 underreports branches in jsdom.
1.0.22 — 2026-03-13
Fixed
- InstallCommand tests: Normalize console output in tests so assertions pass when SymfonyStyle wraps lines with block borders. Fixes five failing unit tests in environments where the console formats warning/note blocks with line breaks.
1.0.21 — 2025-02-19
Fixed
- InstallCommand: Moved help text from
#[AsCommand(help: ...)]tosetHelp()inconfigure(). Symfony Console 6.x does not accept thehelpnamed parameter inCommand::__construct(), which caused “Unknown named parameter $help” on PHP 8.1 with Symfony 6.4.
1.0.20 — 2025-02-18
Fixed
- DataCollector / services.yaml: Corrected
TwigInspectorCollectorconstructor arguments — removed incorrect@request_stack; the second argument is?Twig\Environment(@twig). FixesTypeErrorwhen loading the bundle on Symfony 8.
Changed
- Tests: Added
testOnKernelResponseSkipsWhenResponseContentIsFalseto improve PHP test coverage (methods 95.06%, lines 97.84%).
1.0.19 — 2026-03-02
Fixed
- DataCollector: Serialization for web profiler —
$enableMetricsis restored in__unserialize()andlateCollect()guards withisset()so the collector does not throw “Typed property $enableMetrics must not be accessed before initialization” on PHP 8.5.
Changed
- Demos: Symfony 6 demo uses FrankenPHP without worker mode for reliable startup in CI.
- Dependencies: Composer lock and Symfony 7.4.6 in demos; PHP-CS-Fixer 3.94.2.
1.0.18 — 2026-03-02
Changed
- CI: Simplified GitHub Actions workflow; testing integrated into main
docker-compose.yml. - Docker: Root
Dockerfileupdated to PHP 8.2 with Node.js for asset management. - PHP-CS-Fixer: Configuration updated for improved code style consistency.
- Demos (Symfony 6, 7, 8): Added README per demo; Makefile and docker-compose adjustments.
Removed
- docker-compose.test.yml: Removed; tests now run via the main docker-compose setup.
1.0.17 — 2026-02-18
Fixed
- OpenTemplateController: Skip non-string namespaces in
collectFilesystemPaths()to avoidTypeErrorwhenFilesystemLoader::getNamespaces()returns integer keys.
Changed
- Demos: Custom Caddyfile serves HTTP on port 80 (no HTTPS). Access at
http://localhost:8001. - Root Makefile: Asset targets (
assets,assets-dev,assets-watch,assets-clean) now run inside the Docker container.
1.0.16 — 2026-02-18
Changed
- DependencyInjection: Removed redundant
setArgument()calls inNowoTwigInspectorExtension. Configuration is now passed solely via parameters. Internal refactor — no user-facing changes. - Makefile: Asset targets renamed for clarity —
build-assets→assets,build-assets-dev→assets-dev,watch-assets→assets-watch,clean-assets→assets-clean.
1.0.15 — 2026-02-18
Added
- Security — prod restriction: The “open in IDE” controller returns 404 in
prodeven if routes were accidentally enabled. - ChainLoader support: Template path validation now works when using
ChainLoaderwith multiple Twig template directories.
Changed
- Routes: Recipe and InstallCommand now import routes with
when@dev:andwhen@test:only.
1.0.14 — 2026-02-18
Changed
- Dependencies: Updated composer.lock.
- Services: Internal services now use FQCN as service IDs. The controller service
nowo_twig_inspector.controller.open_templateis unchanged for route compatibility. - Configuration: Added commented placeholder for future
optimize_output_bufferingoption in the config template.
1.0.13 — 2026-02-18
Fixed
- .gitattributes: Fixed malformed line (missing newline before comment) that could cause “not a valid attribute name” errors.
Changed
- Documentation: Clarified asset pipeline (TypeScript → JavaScript) in
DEVELOPMENT.mdandCONTRIBUTING.md.
1.0.12 — 2026-02-11
Added
- Configuration: New option
inject_on_sub_requests(bool, defaultfalse). Set totruewhen your main HTML is rendered during a sub-request and all templates show “sub-request” in the panel.
Changed
- Overlay default: When the inspector is enabled, the overlay is off by default. Click the
</>toolbar icon to turn it on (green); click again to turn it off (yellow). - Toolbar dropdown: Filter input and Rescan button are now initialized after
DOMContentLoadedso they reliably appear in all environments.
1.0.11 — 2026-02-10
Added
- Web Profiler — Controllers tab: Lists every controller invoked in the request (main controller + sub-requests). Each row shows controller name, role (Main / Fragment), and render count.
- Controller HTML comments: When the inspector is enabled, HTML comments are injected for controllers using box-drawing characters, wrapping each fragment’s output.
- Overlay — controller recognition: Hovering over an element inside a controller range shows the controller (and template) in the tooltip.
- Panel — Renders column: Templates and Blocks tables now show how many times each template/block was rendered.
Changed
- TwigInspectorCollector: Now receives
ControllerRenderSubscriberas its first constructor argument. No user-facing breaking change.
1.0.10 — 2025-02-10
Added
- Screenshots: Three screenshots added to the README (overlay tooltip, toolbar dropdown, DevTools HTML comments).
- Panel: New “How to use” tab in the collector panel (first tab by default).
- Filter: Filter by template path as well as name; comma-separated terms (OR logic); persistent highlight frames when filter is active.
- Tests: Vitest + jsdom for frontend;
blockMatchesFilter()unit tests.
Fixed
- Template timing: Collector now detects
Symfony\Bridge\Twig\Extension\ProfilerExtensionso timing data appears when the Twig profiler is enabled.
Changed
- Toolbar dropdown: Simplified; long “How to use” block moved to the panel tab.
1.0.9 — 2025-01-26
Fixed
- Twig 4.0+ compatibility: Added
#[\Twig\Attribute\YieldReady]attribute to theNodeStartclass to resolve deprecation warnings in Twig 4.0+.NodeEndalready had this attribute; both node classes are now consistent.
1.0.8 — 2024-12-15
Changed
- Packagist: Improved package discoverability — enhanced description and expanded keywords in
composer.json.
1.0.7 — 2024-12-15
Changed
- Documentation: Moved all documentation files into the
docs/directory.
Fixed
- Twig 3.15+ compatibility: Replaced direct
Nodeinstantiation withBodyNodeinDebugInfoNodeVisitorto resolve deprecation warnings introduced in Twig 3.15.
1.0.0 — 2024-12-11
Initial stable release.Compatibility
| Dependency | Supported versions |
|---|---|
| PHP | >= 8.1, < 8.6 |
| Symfony | >= 6.0, >= 7.0, >= 8.0 |
| Twig | >= 3.8, >= 4.0 |
| Symfony Web Profiler | >= 6.0, >= 7.0, >= 8.0 |
Added
- Twig template inspection with visual overlay — hover over HTML elements to see which template rendered them, click to open in IDE.
- HTML comments injected before and after Twig blocks using box-drawing characters.
- Symfony Web Profiler integration — toolbar toggle, enable/disable checkbox, and JavaScript overlay.
OpenTemplateControllerfor opening templates directly in the IDE.TwigInspectorCollectorDataCollector for Web Profiler.- Twig extensions and node visitors for comment injection.
- PHPUnit test suite, PHP-CS-Fixer configuration, Docker development environment, and Makefile.
