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.
Scope caveat: jbsnewmedia/asset-composer-bundle is a Symfony bundle, not a Laravel package. It has no service provider, no Blade directives, no Laravel config publishing, and its public surface is Twig functions plus a Symfony controller/exception path. Any "Laravel" framing below assumes either (a) a hybrid Symfony/Laravel estate, or (b) reuse of the bundle's path-resolution logic inside a Laravel app — which is not exported as a standalone library.
Architecture fit
BadRequestHttpException is a Symfony class) alongside Blade/Eloquent — a dual-stack surface with no first-party support.laravel-vite-plugin, symfony/asset-style helpers, or a small custom resolver achieve the same outcome without a second framework.Integration feasibility
rcrowe/twigbridge (or similar) plus Symfony components, and the bundle's routing/controller conventions do not map to Laravel middleware or exception handling without glue code.Technical risk
>=8.1 → >=8.4 in 1.2.0. This is a breaking change shipped as a minor release. Treat version constraints as untrustworthy; pin exactly and read every changelog.getAssetFileName() now rejects any path containing .. up front, and the containment check moved into assertFileInsideProjectDir() applied after resolution, with separator/trailing-slash normalization. Both changes are correct in intent but touch the exact boundary that prevents serving files outside the project... will also reject legitimate filenames such as icon..svg or versioned names like app..min.js. Low probability, non-zero, and it fails with a 400 rather than a 404 — a client-visible contract change.realpath(), symlinked vendor dirs pointing outside the project would still fail — the release notes imply the former.^8.0 early pulls that maturity risk in.Key questions
assertFileInsideProjectDir() compare against a resolved (realpath) project root, or a normalized string path? What stops a symlink from escaping the project?.. rejection a substring test or a path-segment test? What happens to legitimate asset names containing ..?Stack fit
Migration path (1.1.7 → 1.2.0)
1.1.7 exact, not ^1.1) until the 8.4 runtime lands — the constraint widening to ^8.0 does not protect you from the PHP floor.Compatibility
>=8.4: hard requirement, breaks 8.1–8.3.symfony/framework-bundle, symfony/yaml: ^6.4|^7.0|^8.0 — additive, no forced framework upgrade.Sequencing
Maintenance
composer.json, plus a scheduled review cadence.Support
Scaling
Failure modes
composer update — surfaces in CI, ideally never in production...; appears as broken images/CSS rather than an exception in logs, so instrument the asset route's 4xx rate and alert on it.BadRequestHttpException will not be handled by Laravel's exception handler and may render as a 500.Ramp-up
How can I help you explore Laravel packages today?