dmytrof/template-parameters-bundle
twig.global variables.Adopt if:
{% if app.debug %}...{% endif %}).Look elsewhere if:
{% include %} with dynamic paths).For Executives: "This bundle lets us dynamically customize templates (e.g., user-specific UI, A/B tests) without bloating our codebase. It’s a lightweight, Symfony-native solution that keeps our frontend logic clean and maintainable—ideal for scaling personalization without technical debt."
For Engineering: *"TemplateParametersBundle replaces manual Twig variable passing with a structured, bundle-based approach. Key benefits:
config/parameters.yml) and reuse across templates.For Developers: *"Imagine replacing:
{% if user.is_premium %}
<button class="premium">Upgrade</button>
{% endif %}
With:
// config/services.yaml
services:
App\Service\PremiumFeatures:
arguments: ['%premium_button_text%'] // Injected via bundle
The bundle handles the Twig injection automatically. Pros: Cleaner templates, easier testing. Cons: Add a layer of abstraction—we’ll need to document the parameter flow."*
How can I help you explore Laravel packages today?