symfony2admingenerator/twig-generator
Twig generator component for Symfony2AdminGenerator, providing Twig-based templates and rendering support for generated Symfony admin interfaces. Helps scaffold and customize CRUD backends with reusable Twig templates.
make:*-style commands, module scaffolds for a monorepo, client SDK stubs from an OpenAPI/DB schema), a template engine is the natural implementation and this is a reference design.Consider (narrowly) if:
Look elsewhere if:
nikic/php-parser or nette/php-generator are the correct tools; string templates are the wrong abstraction for complex class generation.artisan make:* with publishable/custom stubs, or Symfony Maker, handle the 80% case with zero new dependencies. Start there; only escalate to a custom generator when stub customization is genuinely insufficient.PM verdict: treat as inspiration and a fallback implementation sketch, not an approved dependency. Adoption cost is low but so is the payoff; the maintenance risk is asymmetric.
To executives: This is a small, MIT-licensed template-based code generator. It's not a platform or a purchase — it's a pattern for automating repetitive file creation. The honest headline: it has essentially no adoption (1 GitHub star, 0 dependent packages), which means no vendor, no support contract, and no community safety net. My recommendation is not to add it as a dependency. Instead, use it as a design reference and either (a) lean on framework-native generators we already have, or (b) build a ~1-week internal equivalent we fully own. Either path gets the productivity upside without inheriting an unmaintained component.
To engineering: The architecture is sound and cheap to replicate — builders produce variable maps, Twig renders templates, a writer persists files. If we build, we get control over idempotency, dry-run/diff output, overwrite protection, and PHP-version guarantees, all of which this package leaves to us anyway. If we prototype with it, keep it behind a dev-only dependency and timebox it; do not let it reach require in a shipped package.
Ask: approve a short spike (3–5 days) to measure boilerplate reduction on our top repetitive file types, with a decision gate: adopt framework-native stubs if they cover ≥70% of cases, otherwise build in-house.
How can I help you explore Laravel packages today?