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 Composer Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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

  • Purpose: resolve and serve assets shipped inside Composer packages (vendor assets) into templates, with containment checks against directory traversal.
  • Fits a Symfony/Twig application cleanly. In a Laravel app it introduces a second framework runtime (Twig + Symfony HttpKernel, since BadRequestHttpException is a Symfony class) alongside Blade/Eloquent — a dual-stack surface with no first-party support.
  • For Laravel-native needs, this is duplicative: Vite + laravel-vite-plugin, symfony/asset-style helpers, or a small custom resolver achieve the same outcome without a second framework.

Integration feasibility

  • Pure Laravel: low. Requires 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.
  • Hybrid estate (Symfony service already present): high for the Symfony side, zero reuse on the Laravel side.
  • Cost driver is not the package — it is the PHP 8.4 platform uplift it now mandates.

Technical risk

  • Breaking baseline change in a minor version. PHP floor moved >=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.
  • PHP 8.4 requirement is the dominant risk. Laravel 10 tops out at PHP 8.3; Laravel 11 supports 8.4 but many estates are still on 8.2/8.3 images. This package can force an infrastructure upgrade ahead of the app framework's own schedule.
  • Security-sensitive code path refactored. 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.
  • Behavioral edge case: rejecting any path containing the substring .. 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.
  • Symlink semantics need verification: normalizing separators/trailing slashes to make symlinked Composer path repositories pass containment is a relaxation. The open question is whether resolution still refuses symlinks that genuinely point outside the project root. If normalization ran on an unresolved path, containment is weakened; if it ran on realpath(), symlinked vendor dirs pointing outside the project would still fail — the release notes imply the former.
  • Symfony 8 support is additive and low-risk, but Symfony 8's ecosystem (bundles, testing tools) is still settling; adopting ^8.0 early pulls that maturity risk in.

Key questions

  1. Is there any Laravel service in scope, or is this assessment actually a Symfony-side decision mislabeled as Laravel?
  2. Does assertFileInsideProjectDir() compare against a resolved (realpath) project root, or a normalized string path? What stops a symlink from escaping the project?
  3. Is the .. rejection a substring test or a path-segment test? What happens to legitimate asset names containing ..?
  4. Why did a breaking PHP floor change land in 1.2.0 rather than 2.0.0 — is there a published deprecation/support policy?
  5. What is the maintainer bus factor and security disclosure process for a package that now sits on the asset-serving path?
  6. Are 8.1–8.3 users expected to stay on 1.1.7, and will 1.1.7 still receive security fixes (including backports of the traversal hardening)?

Integration Approach

Stack fit

  • Symfony/Twig: natural fit; adopt on the Symfony side only.
  • Laravel-only: do not integrate. Mirror the pattern (resolve vendor asset path, assert containment, serve) with a small in-house helper behind a Laravel filesystem abstraction — cheaper than importing Twig + Symfony HttpKernel.
  • If a shared asset-resolution contract is needed across both stacks, define it internally rather than standardizing on this bundle.

Migration path (1.1.7 → 1.2.0)

  1. Inventory PHP runtime across CI, Docker base images, staging, and production. Anything below 8.4 blocks the upgrade.
  2. Keep 1.1.7 pinned (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.
  3. Upgrade PHP 8.4 in CI and a non-production environment first; confirm the app framework version supports it.
  4. Upgrade the bundle on a branch; run the existing asset/template test suite plus new negative tests (traversal attempts, symlinked path repo, filenames with consecutive dots).
  5. Canary the asset-serving route; watch 400 rates as the primary regression signal.
  6. Update local-dev onboarding docs for symlinked Composer path repositories — this is the workflow the release explicitly unblocks.

Compatibility

  • PHP >=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.
  • Twig version compatibility is not stated in the notes; verify against your Twig constraint before merging.
  • Downstream transitive conflicts are most likely in dev tooling (QA/static analysis) rather than runtime.

Sequencing

  • Do the PHP 8.4 platform uplift as its own change with its own rollback, before the bundle bump. Bundling a runtime upgrade and an asset-path security change into one deploy makes incident attribution impossible.
  • If the security hardening is urgent and the 8.4 uplift is not ready, escalate question 6 (1.1.7 backport) rather than forcing the platform change.

Operational Impact

Maintenance

  • Small third-party bundle with a narrow surface — low ongoing maintenance for the code itself, but it now sits on a security boundary, so it needs active CVE monitoring rather than "set and forget."
  • The minor-version breaking change is a governance signal: budget for reading every release note and for exact version pinning in composer.json, plus a scheduled review cadence.

Support

  • No commercial support, no LTS; community issue tracker only. Security response time is unknown and should be treated as a dependency risk item on the risk register.
  • Internal support capability is the real constraint: whoever owns asset serving must be able to read the containment logic, not just the README.

Scaling

  • Per-render file resolution and containment checks add stat/realpath overhead on every asset reference. Negligible at typical page volumes; relevant for high-fanout templates or uncached rendering paths. Mitigate with template-level caching and OPcache, and confirm results are cached where the template engine allows.
  • No horizontal scaling concerns — no shared state, no external service.

Failure modes

  • Hard install failure on PHP < 8.4 at composer update — surfaces in CI, ideally never in production.
  • Spurious 400s on legitimate asset paths containing ..; appears as broken images/CSS rather than an exception in logs, so instrument the asset route's 4xx rate and alert on it.
  • Containment false positive/negative after the symlink normalization change: either broken local assets (dev pain) or an overly permissive check (security exposure). Both are silent — cover with explicit tests.
  • Dual-framework exception mismatch in a Laravel context: Symfony's BadRequestHttpException will not be handled by Laravel's exception handler and may render as a 500.
  • Ecosystem lag on Symfony 8 transitive dependencies, most likely in test/QA tooling.

Ramp-up

  • Low for a Symfony/Twig team: the improved EN/DE README, especially the local-asset and path-repository guidance, shortens onboarding to well under a day.
  • Higher for a Laravel team, where the cost is not learning the bundle but learning Twig and the Symfony request/exception lifecycle — which is exactly the argument against adopting it there.
  • Recommend a short internal note capturing the containment contract (what is allowed, what returns 400, how symlinks are treated) so the behavior is documented in-house rather than inferred from release notes.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core