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

Asset Manifest Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Abandonment: archived, single-digit stars, zero dependents, no maintainer. No security response capability, no CVE intake, no PHP 8 compatibility work. Any fork becomes your team's permanent liability.
  • Redundancy: for Symfony 3.3+ the entire feature is native. Keeping this dependency adds supply-chain surface for a capability the framework already provides.
  • Blast radius: small in code volume (parse JSON, map path), so a fork is genuinely cheap if forced. The risk is ownership and bus factor, not complexity.
  • Silent failure profile: a missing manifest key typically degrades to the un-hashed path rather than throwing, which surfaces as production 404s rather than deploy-time errors.

Key questions for the decision:

  1. Which applications in the estate are Symfony (and which version), and does any of them actually declare this dependency today? (composer why zenstruck/asset-manifest-bundle per repo.)
  2. Is the manifest format emitted by the current build tool byte-compatible with what this bundle expects (key normalization, leading-slash handling, entrypoint vs. chunk naming)?
  3. Is the consuming Symfony version ≥3.3? If yes, the replacement is a config line, not an integration project.
  4. If <3.3, what is the cost of the Symfony upgrade versus the cost of a maintained internal fork? Upgrading dominates in almost every case.
  5. Does the Twig layer call a bundle-specific function name, or plain asset()? This determines whether template edits are needed at all.

Integration Approach

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):

  1. Native Symfony manifest support (Symfony 3.3+): set 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.
  2. Modern asset bundle: symfony/webpack-encore-bundle or a Vite bundle, which subsume manifest handling and add integrity hashes, entrypoints, and preload hints.
  3. Internal fork only if an application is pinned below Symfony 3.3 and cannot be upgraded on the roadmap. Scope the fork to PHP 8 compatibility and a tagged release; do not extend features.

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:

  1. Inventory: enumerate every repo declaring the package and every Twig/Blade template referencing its output.
  2. Capture the current manifest and the resolved-URL output for a representative set of assets — this is the regression oracle.
  3. Swap to native json_manifest_path in a single non-critical service; diff resolved URLs across dev/staging/prod.
  4. Roll forward service-by-service; each is a config change plus a template grep, so batch them with routine Symfony upgrades rather than as a standalone initiative.
  5. Remove the dependency and delete the fork if one was created; add a CI rule blocking re-introduction.

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.

Operational Impact

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:

  • Missing manifest (build step skipped, wrong path, not deployed): exception at first asset render or silent fallback to un-hashed paths.
  • Missing key in an otherwise valid manifest: un-hashed path emitted → 404 in production, no deploy-time signal.
  • Stale container cache after deploying a new manifest: old hashes served against new files, producing 404s until cache clear.
  • Path prefix / CDN base URL mismatch: assets resolve to correct filenames but wrong origin.
  • PHP/Twig upgrade: fatal at extension registration, caught only at boot — but only if a boot smoke test exists.

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.

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource