Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Extra Bundle Laravel Package

twig/extra-bundle

Twig Extra Bundle is a Symfony bundle that automatically enables all Twig extra extensions with no configuration. Install via Composer to add useful filters, functions, and tags to your Twig templates without manual setup.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Templating engine standardization (Twig vs. Blade vs. Livewire/Inertia). This package is the last-mile wiring that makes Twig's optional extension set usable without custom service configuration — but only in a Symfony-shaped application. It informs the "how cheap is Twig to run" half of the decision, not the "should we use Twig" half.
  • Build vs. buy on template helpers. Every custom filter a team writes (truncate, markdown rendering, localized number/date/plural formatting, CSS inlining, HTML minification, template-fragment caching) is a small liability. This bundle lets you buy those from the upstream Twig org as one-line installs, so the PM decision is which capabilities to enable, not whether to maintain them.
  • Scoping content and rendering features. The extras map directly to roadmap items a PM cares about: IntlExtension → multilingual UI and locale-aware formatting; MarkdownExtension / MarkdownExtraExtension → user-authored or CMS content; CssInlinerExtension / InkyExtension → transactional email fidelity; CacheExtension → render-cost reduction on expensive partials; HtmlCompressExtension → payload trimming. Treat the bundle as an enabler that makes those feature increments cheap rather than separate build items.
  • Vendor and maintenance exposure. MIT, Twig-org maintained, active 2026 releases (including a 4.0 alpha raising the floor to PHP 8.2). But the low composite score and reported zero dependents mean it should be classified as a replaceable convenience layer, not a strategic dependency — reimplementing its behavior is a few dozen lines of service configuration, so it carries no lock-in.
  • A deliberate non-decision for Laravel. This is a Symfony bundle built on Symfony's DI container and event system, with extensions that assume Form, Router, CSRF, and AssetMapper. It should not be cited as evidence for introducing Twig into a Laravel codebase; in that context it is at best inert and at worst extra Symfony surface area.

When to Consider This Package

Adopt when:

  • The application is Symfony, or bootstraps Symfony's container/kernel (Symfony-based admin, CMS, back office) and renders Twig.
  • You want extra extensions enabled declaratively — installing twig/markdown-extra, twig/intl-extra, twig/cache-extra, etc. is the opt-in, with no service registration.
  • You need several extras at once and the alternative is hand-registering and version-matching each one.
  • You value inheriting the upstream org's compatibility work over owning an internal Twig helper bundle.

Look elsewhere when:

  • The stack is Laravel on Blade, Livewire, or Inertia. No product problem here is solved.
  • You are on Laravel + Twig via twig-laravel/twig: register only the two or three non-Symfony extensions you actually use (String, Intl/Text, Markdown) in a service provider. Same filters, no Symfony component weight, no auto-configuration that assumes a container you don't have.
  • Your plan depends on the Symfony-coupled extras (Form, Url, Csrf, AssetMapper) in a non-Symfony app — those require adapter layers that are fragile across upgrades. Use framework-native equivalents instead.
  • You need one or two filters, or you intend to override the upstream defaults anyway (custom markdown parsing, custom date formatting); you'd be paying for behavior you replace.

How to Pitch It (Stakeholders)

Executives. This is plumbing, not a differentiator. It lowers the marginal cost of a small set of rendering capabilities — locale-aware formatting, markdown content, email-safe HTML, template caching — by making maintained extensions a one-line install. Licensing is MIT, stewardship is the Twig organization, and the escape hatch is trivial: if it disappeared, we'd replace it in about a day. That makes vendor risk low. The critical caveat is scope: its value is realized only if we are already committed to Twig inside a Symfony application. It should not be used as an argument for pulling Twig into our Laravel/Blade surfaces.

Engineering — Symfony surfaces. Install the extras you need, install the bundle, stop. It discovers and registers them; there is no config file to maintain. Pin the minor version, note that 4.x requires PHP 8.2, and treat the bundle as thin configuration rather than an abstraction to build on.

Engineering — Laravel surfaces. Don't add it. If Twig is already decided (e.g., a shared template set inherited from a Symfony system), register the non-Symfony extras manually and keep composer lean. Explicitly flag that extensions expecting Symfony routing, forms, CSRF, or asset mapping will not work without adapters, and don't schedule features against them.

Recommendation. No action for Blade/Livewire workstreams. For any Symfony-side rendering surface, adopt at near-zero cost and revisit only when we take on the PHP 8.2 / 4.x baseline.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator