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

Hashed Asset Bundle Laravel Package

incenteev/hashed-asset-bundle

incenteev/hashed-asset-bundle is a Symfony bundle for cache-busting static assets by generating and resolving hashed filenames. It helps serve versioned CSS, JavaScript, and images with long-lived browser caching while keeping templates clean and deployments predictable.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • This is a Symfony bundle, not a Laravel package. It implements Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface and registers via symfony/dependency-injection and symfony/framework-bundle. It has no Laravel service provider, facade, or config publishing.
  • In a Laravel codebase it is effectively unusable as shipped: Laravel's asset() helper and Vite/Mix manifest pipeline do not consult symfony/asset, so the bundle's strategy would never be invoked even if autoloaded.
  • The portable value is the algorithm (content-hash-based cache busting), not the package. A TPM should treat this as a reference implementation for a ~50-line Laravel helper or custom VersionStrategy if the team is on Symfony.
  • Fits cleanly only where symfony/asset is the URL generator — i.e., Symfony applications, including Symfony-based Drupal or Ibexa installs.

Integration feasibility

  • Symfony: composer require incenteev/hashed-asset-bundle, register in bundles.php, configure the strategy. Low effort, single config surface. Use v1.6.2 or later — earlier tags carry incorrect symfony/asset and symfony/cache constraints.
  • Laravel: not feasible without a port. Any adoption story must be scoped as "build equivalent" rather than "install package."
  • No JavaScript toolchain dependency, no build-step coupling — a genuine plus versus Encore/AssetMapper for teams avoiding a Node pipeline.

Technical risk

  • Code surface is small and the concept is simple; MIT license removes legal friction.
  • Adoption signal is weak: 26 stars, 0 dependents. Despite a recent release cadence, this is a low-traffic project with a single-maintainer history — bus-factor risk.
  • v1.6.2 is a dependency-constraint patch: it corrects the declared symfony/asset and symfony/cache version ranges. This is not a feature or security release and requires no code changes, but it confirms the constraint-drift hazard is real rather than theoretical — prior tags could resolve against Symfony versions the maintainer had not validated. Any service already locked to ≤ v1.6.1 should have its composer.lock reviewed.
  • Hashing cost on every request is a known pitfall if the cache layer is not warmed; correctness depends on deploy-time cache invalidation.
  • Path traversal and file-read behavior on missing assets should be reviewed before production use.

Key questions

  • Is the target application actually Symfony, or is this being evaluated under a mislabeled "Laravel" brief?
  • Which Symfony and PHP versions do the v1.6.2 constraints now permit, and do they cover our LTS target?
  • For services pinned to ≤ v1.6.1: what Symfony version did Composer actually resolve, and was it a combination the maintainer tests against?
  • Are hashes cached/warmed, or computed per request? What is the cold-cache latency budget?
  • Does Symfony's built-in json_manifest_path strategy or AssetMapper already satisfy the requirement, making this redundant?
  • How are missing assets handled — exception, silent fallback, or unhashed URL?
  • Is there a named maintainer commitment, or is this a de-facto archived project? The v1.6.2 patch arrived via an external contributor, which is mildly positive for responsiveness but does not resolve single-maintainer risk.

Integration Approach

Stack fit

  • Greenfield Symfony: acceptable, but the built-in json_manifest_path version strategy (Encore) and AssetMapper already deliver content-hash URLs in modern Symfony. This bundle's niche is narrow — Symfony apps without a Node build step and without AssetMapper.
  • Laravel: do not integrate. Reimplement content hashing against Laravel's asset() / Vite manifest path if cache-busting granularity is the actual goal.
  • Mixed estates: viable only in the Symfony services; do not attempt to unify asset URL generation across Laravel and Symfony services with this.

Migration path

  • From EmptyVersionStrategy or StaticVersionStrategy: configuration-only swap. All asset URLs change shape, which invalidates every CDN and browser cache entry — schedule accordingly.
  • From Encore/AssetMapper manifest hashing: no functional gain; not worth the migration.
  • Rollback is a one-line config revert, but cached client-side URLs will 404 until TTL expiry unless origin keeps old files.

Compatibility

  • Pin to v1.6.2+; the constraint correction is the only substantive change in this release and is the reason to move off earlier tags.
  • After upgrading, re-run dependency resolution and diff the resolved symfony/asset / symfony/cache versions — the patch may pull different minors than a previously locked install, so treat it as a dependency change, not a no-op.
  • Verify PHP constraint against the platform's supported PHP range, and Symfony constraint against the framework's pinned minor/LTS.
  • Confirm interaction with reverse proxies and CDNs: hashed URLs are immutable-friendly, so pair with long Cache-Control and keep prior deploy artifacts available during rollout windows.
  • Check any other bundle that overrides the assets.version_strategy service — conflicts are silent.

Sequencing

  1. Confirm stack (Symfony vs. Laravel) and whether built-in manifest hashing already meets the requirement.
  2. Audit existing composer.lock files for any install at ≤ v1.6.1 and record resolved Symfony versions before upgrading.
  3. Spike in a non-production branch: install v1.6.2, configure, diff generated URLs, measure cold-cache and warm-cache request latency.
  4. Review source for missing-asset behavior and file access patterns.
  5. Wire cache warming into the deploy pipeline before enabling in production.
  6. Roll out to one low-traffic service, monitor 404 rate on static assets for one cache cycle, then broaden.
  7. Document the maintenance owner and a fallback plan (revert to static version or in-house helper).

Operational Impact

Maintenance

  • Minimal code to maintain, but the project is effectively single-maintainer with negligible downstream adoption. Plan for the possibility of forking or vendoring.
  • The v1.6.2 release is a routine patch from an outside contributor — evidence the project is not abandoned, but not evidence of a support commitment. Do not read it as a stability signal.
  • Symfony major-version upgrades become our risk, not the maintainer's. Budget a compatibility review each framework upgrade cycle, and specifically re-check that the declared symfony/asset / symfony/cache constraints still reflect reality — the v1.6.2 fix shows they can silently drift.
  • MIT license means forking is legally trivial — the practical mitigation.

Support

  • Community-only: GitHub issues, no SLA, no commercial backing, no vendor indemnity.
  • Internal ownership must be explicit. A TPM should require a named engineer accountable for the fork/upgrade path before approval.

Scaling

  • Hash computation is file I/O; at scale it must be cached (cache warmer or memoized strategy). Cold caches under load are the scaling failure point.
  • Hashed, immutable URLs are CDN-optimal: high hit ratios, long TTLs, no purge-on-deploy if origin retains old artifacts.
  • Adds no runtime service dependency, no network hop — scales horizontally without new infrastructure.

Failure modes

  • Cold cache after deploy → per-request hashing spike, latency degradation, possible timeouts under burst traffic.
  • Cache not invalidated → stale hash served, clients request a URL that no longer exists → 404s on CSS/JS.
  • Constraint drift → Composer resolves an untested Symfony combination after a patch bump (the v1.6.2 scenario in reverse); pin versions and re-validate on every dependency update.
  • Asset removed or renamed → exception or unhashed fallback depending on implementation; verify behavior.
  • Symfony upgrade → service definition or interface changes break the strategy silently, producing unversioned URLs.
  • Multi-app shared cache → hash collisions across environments if cache namespace is not isolated.
  • CDN without origin retention → rollout and rollback both produce broken asset references.

Ramp-up

  • Symfony engineers: under an hour — one config block, one concept.
  • Laravel engineers: N/A for the package; porting the idea is a half-day task with tests.
  • Reviewers must be told explicitly this is not a Laravel dependency; mislabeling in the brief is itself a signal to re-verify the requirement before any adoption decision.
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
shitoudev/permissionmanager