Download the PHP package gatomontes/symfony-twig-route-tracer without Composer
On this page you can find all versions of the php package gatomontes/symfony-twig-route-tracer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download gatomontes/symfony-twig-route-tracer
More information about gatomontes/symfony-twig-route-tracer
Files in gatomontes/symfony-twig-route-tracer
Download gatomontes/symfony-twig-route-tracer
More information about gatomontes/symfony-twig-route-tracer
Files in gatomontes/symfony-twig-route-tracer
Vendor gatomontes
Package symfony-twig-route-tracer
Short Description Symfony bundle that adds route trace anchors to Twig templates for IDE navigation.
License Apache-2.0
Package symfony-twig-route-tracer
Short Description Symfony bundle that adds route trace anchors to Twig templates for IDE navigation.
License Apache-2.0
Please rate this library. Is it a good library?
Informations about the package symfony-twig-route-tracer
Symfony Twig Route Tracer
A DX package for Symfony + Twig projects.
Installation
Problem
Twig to controller navigation in PhpStorm is painful.
This package injects non-rendering route traces into Twig templates so IDE route navigation can be reused.
Example:
The trace never executes at runtime.
Its purpose is IDE navigation.
Commands
Inject a single route:
Preview a route injection without writing files:
Inject all routes:
Injection Rules
- additive
- idempotent
- no duplicates
- alphabetically sorted
- validates generated Twig before writing
- supports
--dry-runpreviews for safe review
MVP Notes
- route resolution uses Symfony router metadata
- template resolution scans controller source for
$this->render('...') - template resolution also follows
renderView()calls and local service/document-builder methods that contain Twig template literals - injected traces use native Twig
path()calls so IDEs can reuse Symfony route recognition - traces are wrapped in
{% if false %}so routes with required params never execute at runtime - namespaced Twig templates such as
@Admin/foo.html.twigare not supported yet
Known Limitations
- template discovery is static and source-based; highly dynamic template selection may not be traced
- namespaced Twig template references such as
@Admin/foo.html.twigare not resolved yet - service traversal is limited to local project services and Twig template string literals
Goals
- Twig -> controller navigation
- leverage existing Symfony route intelligence
- avoid custom IDE plugins
- MakerBundle integration
All versions of symfony-twig-route-tracer with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
symfony/config Version ^6.4 || ^7.0 || ^8.0
symfony/console Version ^6.4 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.0 || ^8.0
symfony/routing Version ^6.4 || ^7.0 || ^8.0
twig/twig Version ^3.0
symfony/config Version ^6.4 || ^7.0 || ^8.0
symfony/console Version ^6.4 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.0 || ^8.0
symfony/routing Version ^6.4 || ^7.0 || ^8.0
twig/twig Version ^3.0
The package gatomontes/symfony-twig-route-tracer contains the following files
Loading the files please wait ...