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

Twig Assetic Filter Bundle Laravel Package

igraal/twig-assetic-filter-bundle

A Symfony bundle that integrates Twig with Assetic by providing a Twig filter for processing assets through Assetic filters. It simplifies compiling, combining, and managing CSS and JavaScript assets directly in Twig templates, reducing manual asset pipeline setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: Poor, and structurally mismatched. This is a Symfony bundle, not a framework-agnostic library. Everything about it assumes Symfony's kernel: a Bundle subclass, DependencyInjection/ extension with services.xml, config tree definitions under a bundle alias (twig_assetic_filter:), and a compiler pass or boot-time hook that pushes filter definitions into the Assetic filter manager. Laravel has no bundle registry, no DI extension/config-tree mechanism, and no Assetic container integration. Making this work in Laravel would mean reimplementing the bundle's registration logic inside a service provider — at which point you have written the integration yourself, and the package contributes only its (small) filter definitions.

Deeper problem: the dependency stack is obsolete. The bundle sits on top of symfony/assetic-bundle and assetic, both effectively unmaintained (Assetic's own docs have pointed at Webpack/Encore for years; the Symfony bundle was deprecated and later removed from the ecosystem). The Twig side depends on assetic's Twig extension, which registers {% stylesheets %}, {% javascripts %}, and {% image %} tags. Laravel's Twig story runs through rcrowe/twigbridge, which does not wire up Assetic's extension and provides no equivalent of Symfony's asset/filter container plumbing. So the three-way integration the bundle exists to perform — Twig + Assetic + framework config — has no landing zone in Laravel.

Integration feasibility: Low. A Laravel path would require, at minimum: twigbridge installed, assetic pulled in and pinned to a version that still runs on the target PHP, a hand-written Twig extension registration to expose the asset tags, a filter factory shimmed into Assetic\FilterManager, and manual asset dump/warmup wiring (the bundle normally relies on Symfony's assetic:dump command — that command ships with the Symfony bundle, not Assetic core). Each of those is a bespoke integration point, collectively more code than simply calling a minifier from a Vite plugin or an Artisan command.

Technical risk: High. Signals are uniformly negative: no stars reported, score of 0, zero dependents, and a single-vendor namespace (igraal) suggesting an internal utility published once. Expect no CI badge, no test suite, no PHP 8.x compatibility guarantee, and no maintainer responsiveness. The transitive risk is worse than the package itself — adopting it imports Assetic's entire unmaintained dependency tree (some versions of which touch deprecated symfony/process and old twig/twig constraints) into a modern Laravel app, creating a conflict surface with Vite, Laravel Mix, or any current asset tooling. Security exposure is indirect but real: abandoned packages do not receive advisories or patches.

Key questions for the maintainer (or for the decision record):

  • Which assetic and symfony/assetic-bundle versions are actually required, and do those constraints resolve against our PHP and Twig versions at all?
  • Is there any usage outside a full Symfony kernel boot — i.e., can the filters be instantiated standalone?
  • What does this bundle add beyond a handful of filter service definitions that we could not express in ~30 lines of our own code?
  • Is the project accepting PRs, and if we need a PHP 8 patch, is there a release path? (Given 0 dependents, assume no.)

Integration Approach

Stack fit: Fundamentally wrong layer. A Laravel application's asset pipeline is Blade/Vite (or Mix), with laravel-vite-plugin handling manifest resolution and HMR. This package targets the server-side tag generation model — Twig templates emitting grouped asset tags that Assetic resolves and dumps at build time. That model is not merely different from Vite; it is the model Vite replaced. Even if the Twig half worked, you would be introducing a second, parallel asset pipeline with its own cache directory, its own dump command, and its own dev/prod mode toggle — running beside Vite.

Migration path. There isn't a meaningful one from this package to Laravel; the direction only runs the other way. If the goal is "Twig templates in Laravel with grouped, minified assets," the sane sequence is:

  1. rcrowe/twigbridge for Twig in Laravel (mature, maintained, actively used).
  2. vite-plugin-twig or the standard @vite() directive exposed to Twig via a small custom function, so Twig templates participate in the Vite manifest.
  3. Vite's own build.rollupOptions.input for entry grouping, with terser/lightningcss for minification — replacing Assetic filters entirely.
  4. If a specific Assetic filter (e.g., a legacy LESS/SCSS or image filter) is the actual reason for interest, port that single filter to a Vite plugin or a PostCSS step.

Only pursue this package if a hard constraint forces server-side Assetic tag resolution — and even then, expect to vendor and patch it.

Compatibility. Unverified and likely broken on current stacks. Assume no PHP 8.2/8.3 support, no Twig 3.x support, and dependency constraints that will not resolve alongside a modern Laravel skeleton. Do not attempt in-place adoption; if you must evaluate it, do so in an isolated container with a pinned legacy PHP (7.4 max, realistically 7.1–7.3) to confirm whether it even runs.

Sequencing. Treat as a spike, not an integration: (1) timebox a container reproduction to confirm the package installs and boots under Symfony at all; (2) if it does, measure the effort to lift its filter definitions into a Laravel provider; (3) compare that effort against the ~1-day TwigBridge + Vite route. The comparison will almost certainly end the evaluation. Do not sequence this ahead of or alongside an active Vite migration — the two cannot share a build story cleanly.

Operational Impact

Maintenance: Effectively unmaintainable. Zero dependents means no downstream pressure to keep it alive, no community patches, and no realistic expectation that a PHP 8 or Twig 3 fix lands upstream. Any fix becomes a fork: you would vendor the package (path repository or a private fork), own its Assetic constraints, and carry the patch debt indefinitely. Budget for a permanent "we maintain a fork of an abandoned Symfony bundle" line item — which is a hard sell for a Laravel team.

Support: None. Single-vendor namespace, no reported stars or dependents, no evidence of issue triage. Escalation path is "read the source." For a production asset pipeline, that is disqualifying on its own: asset compilation failures are user-visible (broken CSS/JS in prod) and typically need same-day resolution.

Scaling. Assetic's dump model compiles all assets at deploy time into static files — that scales fine for serving, but the build is serial and single-process by default, and cache invalidation is manual (assetic:dump --force equivalent). In a Laravel deployment you would have to reimplement that dump step as an Artisan command or a CI job, and keep it synchronized with the Vite build. Two build steps, two caches, two failure surfaces. For multi-node or container deploys, this means asset artifacts must be baked into the image or shared via a volume — solvable, but it is operational surface you are choosing to add.

Failure modes to expect:

  • Silent no-op tags — Twig's Assetic extension not registered, so {% stylesheets %} renders literally or throws at compile; caught late, in template render.
  • Dependency resolution failure — Composer cannot satisfy assetic/twig constraints against the Laravel skeleton; surfaces as an install-time conflict, blocking the whole app, not just the feature.
  • Stale asset cache — dump not run or run with wrong env; prod serves old bundles while source has changed. Classic Assetic failure, and the reason the ecosystem moved off it.
  • PHP fatal on newer runtimes — deprecated signatures, each(), or dynamic property deprecations; runtime fatal in the container plumbing, possibly on every request.
  • Two-pipeline drift — Vite builds for Blade, Assetic builds for Twig; the two diverge on minification settings, hashing, and CDN paths.

Ramp-up. Near-zero transferable value. An engineer learning this package learns Symfony bundle conventions and Assetic internals — knowledge that is obsolete and does not help them with Laravel, Vite, or TwigBridge. The realistic ramp-up cost is the investigation cost: a day or two to confirm what is already strongly implied by the metadata (0 score, 0 stars, 0 dependents, abandoned upstream stack).

Recommendation. Reject for the Laravel stack. The package cannot be integrated without reimplementing its registrations, brings an abandoned transitive dependency tree, and duplicates a pipeline that Vite already owns. If the underlying need is Twig templating in Laravel, go to rcrowe/twigbridge + Vite directly; if the need is a specific Assetic filter's behavior, port that filter in isolation. The only justification for proceeding is a mandated legacy Symfony coexistence — and even then, isolate it behind a separate service, not inside the Laravel application.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings