zenstruck/asset-manifest-bundle
Symfony bundle that reads a JSON asset manifest (like Webpack Encore's manifest.json) to resolve versioned, hashed asset paths at runtime, so templates reference correct filenames without hardcoding them.
What it actually is: A Symfony bundle (not a Laravel package) that reads a JSON asset manifest produced by an external build step and rewrites asset paths at render time, so Twig asset('js/app.js') resolves to js/app.9f2c1a.js. It is a thin DI + Twig-extension wrapper around a JSON lookup — a predecessor to functionality that shipped natively in Symfony 3.3 (framework.assets.json_manifest_path).
Architecture fit: Narrow by construction. It fits exactly one shape: a Symfony 2.3–3.x application whose front-end build (gulp/grunt/webpack) emits a manifest.json. For a Laravel codebase the fit is zero — Laravel's equivalents are laravel-mix/mix() or the Vite facade, and this bundle cannot be wired into Laravel's container or Blade without a rewrite. Treat "Laravel/PHP package" in the metadata as a categorization error; the real question is whether any Symfony service in the portfolio still needs it.
Integration feasibility: Low-to-moderate, and declining. The archive date (2016-12-22) places it squarely in the PHP 5.5–7.1 / Symfony 2–3 era. Expect composer require to fail hard on PHP 8.x and Symfony 5+/6+/7 due to symfony/symfony and twig/twig version constraints, plus removed APIs (Twig_Extension, getName() on extensions, container Scope semantics). Even a forced install via --ignore-platform-reqs leaves runtime breakage in the Twig extension registration path.
Technical risk: Concentrated but non-trivial for governance reasons.
Key questions for the decision:
composer why zenstruck/asset-manifest-bundle per repo.)asset()? This determines whether template edits are needed at all.Stack fit: Symfony-only, Twig-only, build-tool-agnostic on the producer side. It is a consumer of a convention, not a framework component. In a Laravel-first organization, do not attempt to port it — reimplement the ~50 lines of manifest resolution as a small service or, better, use the framework's native Vite/Mix support. In a Symfony-first organization, only legacy 2.x/3.0–3.2 services are candidates.
Migration path (recommended, in order of preference):
framework.assets.json_manifest_path to the build output and remove the bundle. Keep asset() calls unchanged; delete only bundle-specific Twig function calls if any exist.symfony/webpack-encore-bundle or a Vite bundle, which subsume manifest handling and add integrity hashes, entrypoints, and preload hints.Compatibility work required before any path: pin and document the manifest schema with a checked-in fixture; confirm Twig version; confirm the manifest is written to a path available at container compile time and at runtime (this bundle resolves at runtime, native Symfony resolves at container build — a behavioral difference that affects cache warmup).
Sequencing:
json_manifest_path in a single non-critical service; diff resolved URLs across dev/staging/prod.Sequencing risk: the bundle resolves at render time, native Symfony at container compile time. Deploy pipelines that currently ship a new manifest without clearing the container cache will behave differently. Verify cache-clear ordering in the release process before cutover.
Maintenance: Zero upstream maintenance and no path to obtain it. If retained, the package must be forked into an internal namespace with a named owner, a PHP-version compatibility test matrix, and a documented sunset date. An unforked, unpinned copy is an unowned production dependency.
Support: No vendor, no maintainer, no active issue triage. Internal engineers troubleshooting it will find only Symfony 2/3-era blog posts and Stack Overflow answers that assume Assetic. Effective ramp-up cost for a new hire is dominated by archaeology, not by the code's actual complexity.
Scaling: Negligible. The runtime cost is one JSON read plus an array lookup per asset, typically memoized per request. There is no throughput, memory, or horizontal-scaling concern. Asset delivery still depends entirely on the web server/CDN layer, which this bundle does not touch.
Failure modes to instrument:
Mitigation: add a deploy-time assertion that the manifest exists, parses, and contains a fixed set of critical keys; add a post-deploy synthetic check on a handful of hashed URLs.
Ramp-up: Technically trivial to understand, societally expensive to own. The realistic cost estimate is not engineering hours but the ongoing tax of carrying an archived dependency that every future framework upgrade must route around. Recommendation: do not adopt for new work; treat existing usage as migration debt to be retired alongside the next Symfony upgrade, and prioritize retirement over remediation.
How can I help you explore Laravel packages today?