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

Assetic Config Bundle Laravel Package

fazy/assetic-config-bundle

Symfony bundle that adds configuration support for Assetic, making it easier to define and manage asset pipelines, filters, and compiled assets. It simplifies wiring Assetic settings through bundle configuration.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — Poor / fundamental mismatch. Despite appearing in a package search, fazy/assetic-config-bundle is a Symfony 2 bundle, not a Laravel package. It registers an Assetic filter that rewrites placeholders inside compiled assets using Symfony DI container parameters during the asset dump step. Laravel has no Assetic layer at all: its asset pipeline has moved Elixir → Laravel Mix → Vite, all of which are Node-driven at build time. There is no DI container parameter bag exposed to assets, and Laravel's config() is a PHP runtime concern, not a build-time one. Adopting this package would require standing up a parallel Symfony-flavoured compile step alongside the Laravel build — a second asset pipeline with its own cache, manifest, and failure surface. That is architectural debt purchased for a feature we can implement natively in under a week.

Integration feasibility — Low. Composer-level installation is unlikely to succeed cleanly. The bundle targets Symfony 2.x (symfony/framework-bundle, symfony/assetic-bundle), which pins transitive versions of symfony/console, symfony/process, symfony/yaml, and symfony/event-dispatcher that conflict with the constraints of any supported Laravel release (Laravel 10/11 require Symfony 6/7 components). Assetic itself is abandoned and removed from the Symfony ecosystem years ago. A realistic attempt ends in one of three places: dependency conflict, a --ignore-platform-reqs install that breaks other components, or an isolated Composer project invoked as a shell-out build step.

Technical risk — High, concentrated in three areas.

  • Correctness/leakage: the filter's whole purpose is baking configuration into publicly served CSS/JS. Any value routed through it is effectively published. If a placeholder is typo'd or the parameter is undefined, the likely failure mode is the literal %parameter_name% surviving into production assets — visible, ugly, and a soft information disclosure about internal naming conventions.
  • Dead upstream: Symfony 2 reached end of life in 2018; Assetic is unmaintained. Zero stars, zero dependents, no issue triage, no security response. We would own the code the day we adopt it, with no path to upstream fixes.
  • Runtime compatibility: code of this vintage commonly relies on PHP constructs removed in 8.x. Even as a reference implementation it may need reading rather than running.

Key questions for the requester

  1. What is the actual requirement — "inject environment/config values into built assets," or something narrower like API base URLs and feature flags in front-end bundles?
  2. Is there an existing Symfony 2 service this must interoperate with, or was this surfaced by a keyword search?
  3. Are any secrets expected to flow through this path? If yes, the answer is no regardless of the other answers.
  4. Is the target stack genuinely Laravel, or is this a legacy migration where Symfony 2 artifacts still compile?

Recommendation: Do not adopt. Treat the repository as a pattern reference only — the pattern (build-time placeholder substitution driven by an environment-specific parameter map) is sound and easy to reimplement.

Integration Approach

Stack fit — Does not fit; substitute the pattern. The requirement decomposes into two Laravel-native designs, and the choice depends on whether values must be resolved at build time or at request time.

  • Build-time substitution (closest analogue to the original). Export the whitelisted subset of config to the Node build as VITE_* / MIX_* environment variables, and use a small Vite plugin (or PostCSS plugin) to replace __CONFIG__ tokens during npm run build. This preserves the original's semantics — one artifact per environment — while staying inside the pipeline the team already runs. Cost: one artifact per environment, so CI must build per target.
  • Runtime substitution (usually preferable). Ship a single artifact with placeholders intact and resolve them at request time — a Blade partial emitting <meta name="app-config" content='...'>, or a /config.js route that renders window.__APP_CONFIG__ from config(). This gives environment parity across a single immutable build, which is a better fit for containerized deploys and removes the "which artifact went to prod?" question entirely.

Default recommendation is runtime substitution, with build-time substitution reserved for values that must be inlined for performance or CSP reasons.

Migration path. There is no migration — there is a replacement. Sequence:

  1. Inventory every config key the team intends to expose, and classify each as public-safe or sensitive. Anything sensitive is removed from scope immediately; this inventory is the deliverable that outlives the package decision.
  2. Implement the runtime config.js endpoint (or Vite plugin) with an explicit allowlist, not a denylist, of keys.
  3. Add a build-time assertion that fails the pipeline if any unresolved placeholder token remains in emitted assets — this is the single most valuable control and it is cheap.
  4. Delete the Symfony 2 / Assetic experiment from any local branches so it does not resurface in a future search.

Compatibility. If a genuine need exists to run the original for a legacy Symfony 2 service, isolate it completely: separate Composer project, separate CI job, output consumed as static files. Never let its dependency tree into the Laravel composer.json. Budget for a pinned PHP version in that job, since the surrounding code will not survive an upgrade.

Sequencing. The inventory in step 1 is a hard gate. If it reveals that the only values in scope are one or two public identifiers (API base URL, analytics key), the correct answer is a hardcoded map or an env var read directly in the front end, and the entire exercise collapses to a few hours. Confirm scope before scheduling engineering time — the most likely outcome of this evaluation is that the requirement is smaller than the package's presence implied.

Operational Impact

Maintenance. Adopting the package transfers ownership with no upstream. Every future PHP or Laravel upgrade becomes a manual compatibility review of dead code. The substitute implementation is roughly 100–200 lines of our own, fully understood, with no third-party surface — strictly less maintenance than the "free" dependency.

Support. None available. Zero stars and zero dependents means no community knowledge base, no Stack Overflow corpus, no one who has hit our failure modes. Internal debugging is the only option, and the original author's intent must be inferred from source.

Scaling. Asset compilation is a static build-time concern, so runtime scaling is unaffected either way. The operational cost shows up in CI: a second pipeline means doubled build minutes, two cache invalidation models, and two manifests to reconcile against deploys. Runtime substitution avoids the split entirely and is the better answer for horizontally scaled, immutable deployments.

Failure modes to instrument for.

  • Unresolved placeholder leakage: literal %key% or __CONFIG__ in served assets. Detect with a post-build or post-deploy grep gate; alert on any match.
  • Configuration drift: build-time artifacts silently stale relative to the environment they were deployed to. Mitigated by runtime resolution or by embedding a build identifier and asserting it at startup.
  • Sensitive value exposure: irreversible once cached by a CDN. Prevented only by the allowlist in step 2 and review of the key inventory.
  • Silent compile-step failure: the legacy pipeline is not wired into php artisan or npm run build, so it can be skipped unnoticed and ship stale assets. Any retained legacy step must be gated in CI, not run manually.

Ramp-up. Near-zero transferable knowledge on the team for Symfony 2 bundle conventions and Assetic filter internals; expect several days of source reading before anyone can confidently modify behaviour. By contrast, a Vite plugin or Blade config partial is readable by any current team member on day one. The substitute wins decisively on onboarding cost.

Bottom line for planning: estimate 1–2 days to formally confirm non-viability if a spike is demanded, 3–5 days to implement and test the Laravel-native replacement, and 3–4 weeks plus permanent ownership burden for the legacy-integration path. Only the middle option is recommended.

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