- Is goetas/twital-bundle a Laravel package?
- No. goetas/twital-bundle is a Symfony bundle and provides no Laravel service provider, facade, or publishable config. For Laravel you would use the framework-agnostic goetas/twital core with Twig, typically through rcrowe/twigbridge or a custom view engine. The bundle itself is an architectural mismatch for Laravel.
- How do I install Twital in a Laravel application?
- You cannot install the Symfony bundle directly into Laravel. Install goetas/twital core with Composer and wire it as a pre-compilation layer that turns .twital files into Twig source before Twig compiles them. Exclude the Symfony bundle from the dependency graph and add the integration through TwigBridge or a purpose-built Laravel view engine.
- Does goetas/twital-bundle support Laravel 10 or 11?
- Laravel support is not official and is unverified. The bundle targets Symfony and may still declare symfony/templating, which was deprecated in Symfony 4.3 and removed in Symfony 5. Compatibility with Laravel 10/11, PHP 8.2/8.3, and Twig 3 requires a spike before you commit.
- What PHP and Twig versions does TwitalBundle require?
- That must be confirmed from the package composer.json because the key risk is a legacy symfony/templating or Symfony version constraint. Twital manipulates Twig's parsing and compilation surface, exactly where Twig has tightened compatibility across major versions. Check for a Twig 3 compatibility matrix in CI before adopting it.
- How does Twital handle Twig auto-escaping and template security?
- Twital compiles attribute-driven syntax into Twig source, so auto-escaping is preserved only if every Twital construct maps to escaping-safe Twig output. Review any raw-output escape hatch and Twig sandbox policy before allowing user-supplied template content. Add explicit XSS tests against the generated Twig rather than assuming the compiler preserves safety.
- Is goetas/twital-bundle maintained enough for production use?
- It has roughly 20 stars, no recorded dependents, and a single maintainer. The May 2024 release is encouraging, but there is no documented sustained support or security-response process, so adoption and bus-factor risk are high. If you proceed, pin versions and budget for solo debugging of any incident.
- What are the best alternatives to Twital for Laravel templates?
- Blade components and Twig macros cover most templating needs without a second engine. An existing XML or XSLT pipeline is a better fit when you need XML-ish authoring and strict attribute vocabularies. Twital is niche: it mainly appeals when templates must be authored or consumed as XML-like markup, such as design-tool round-tripping.
- How do I test Twital templates inside a Laravel app?
- Because debugging means reading generated Twig rather than the source template, add tests that compile .twital files to Twig and assert the rendered output. Cover compile determinism and caching, error surfacing, and escaping behavior. There is no IDE syntax support, linting story, or static analysis for the attribute DSL, so tests carry more weight.
- Can I use TwitalBundle alongside Blade in Laravel?
- Not directly. Twital is a Twig pre-compiler and Blade is a separate templating engine, so using both means introducing a second view pipeline. Only do this if a concrete requirement demands XML-ish templates that Blade components cannot meet. Otherwise, stay with Blade to avoid the integration and onboarding cost.
- How long does Twital integration take in a Laravel project?
- A core-only integration is estimated at 3 to 5 engineer-days for a spike and 2 to 3 weeks for production hardening covering caching, error surfacing, configuration, and tests. Bundle integration is not recommended because of Symfony-specific dependencies. Start by confirming the Twig and symfony/templating constraints and whether a real requirement exists beyond Blade or Twig.