jbsnewmedia/asset-composer-bundle
A PHP bundle for composing and managing frontend assets, helping you organize, combine, and serve CSS and JavaScript files from a central configuration. It streamlines asset handling in Symfony-style applications, reducing repetitive markup and keeping templates cleaner.
.. in asset paths plus a single assertFileInsideProjectDir() containment check is a materially better answer than ad-hoc realpath() comparisons. Supports signing off on a path-traversal class of risk without bespoke code.Consider it when:
public/ or introducing a bundler.Look elsewhere when:
@vite or a small custom resolver instead. This is the single most important caveat.For executives: A small, free, open-source Symfony component that lets our templates serve front-end assets directly out of Composer packages, so internal teams don't need a JavaScript build pipeline for back-office and internal tools. The 1.2.0 release is a security and longevity release: it blocks directory-traversal attempts earlier and more reliably, and it declares compatibility with the next major Symfony version — meaning we're not adopting something that strands us at the next platform upgrade. Cost is zero licence; the only cost is the PHP 8.4 runtime upgrade we already have on the platform roadmap.
For engineering leadership: 1.2.0 is a breaking release — PHP ≥ 8.4 required (8.1–8.3 dropped), Symfony ^6.4|^7.0|^8.0 supported. Plan it as part of the PHP 8.4 rollout, not before. Gains: hardened getAssetFileName() (rejects .. up front with BadRequestHttpException), consistent containment checks via assertFileInsideProjectDir(), normalized path comparison so symlinked path repositories resolve, and expanded EN/DE docs for local asset workflows. Integration surface is one Twig function, so rollback and replacement cost are low.
Risk and ask:
How can I help you explore Laravel packages today?