miguel/assetic-angular-js-bundle
Integrates AngularJS asset files with the Assetic pipeline, letting PHP applications bundle, filter, and serve Angular scripts through a single configurable bundle rather than manual includes. A small legacy package best suited to older projects already built on Assetic.
Architecture fit. This is not a Laravel package. The Composer name and repository layout indicate a Symfony bundle (symfony-bundle type): it registers through Symfony's Bundle/DependencyInjection conventions and wires an Assetic filter into Symfony's Assetic bundle pipeline. Laravel has no equivalent concept — there is no bundle registration, no auto-discovery hook, and symfony/http-kernel is not a Laravel dependency. The genuinely portable artifact is the filter class itself: a single implementation of Assetic\Filter\FilterInterface that reads AngularJS HTML templates, escapes them, and emits $templateCache.put('<key>', '<markup>') calls. That is realistically under ~150 LOC.
Integration feasibility. Two paths exist, neither of which is "install the package." (a) Pull the bundle and hand-instantiate the filter inside a standalone Assetic pipeline — technically possible, but you inherit Symfony-only classes and a transitive dependency on symfony/http-kernel for zero runtime benefit. (b) Read the filter and reimplement the ~50 lines of escaping and cache-key logic directly in the build step. Path (b) is the only defensible choice: vendoring hours of work versus a permanent dependency on an unmaintained artifact whose value is a handful of string operations.
Technical risk. Lifecycle risk is high; blast radius is low. Assetic is a legacy asset pipeline (superseded by Webpack Encore and, in the Laravel world, Mix/Vite). AngularJS reached end of life on 2021-12-31. The package shows 0 stars, 0 dependents, 0 forks — no maintainers, no CVE response path, no evidence of PHP 8.x validation. The MIT license makes forking and vendoring legally clean, which is the escape hatch. Because this is a build-time transform with no runtime footprint, a failure manifests as a broken build or a missing template, not a production outage.
Key questions to resolve before any decision.
templateUrl strings Angular components actually request?<script> or SVG?$templateCache consumer expect that name?Stack fit. Assetic is a poor fit for a modern Laravel application. The idiomatic path is Vite (Laravel 10/11) or Mix (legacy), with a template-preloading plugin or a small custom transform that emits the same $templateCache module. If the target application is genuinely still on Assetic — i.e., a Symfony app being incrementally ported to Laravel — this bundle is a waypoint, not a destination.
Migration path. (1) Inventory every HTML template and every templateUrl string in the AngularJS code. (2) Freeze the cache-key format as an explicit contract — this is the single most failure-prone detail and the one most likely to differ from the bundle's default. (3) Implement generation as a Vite plugin or an Artisan command writing a generated templates.js into the build output. (4) Run both generators against the same template set and diff the emitted keys and payloads. (5) Delete the dependency.
Compatibility. Expect the package's PHP constraint to conflict with Laravel's ^8.1 floor; Composer will either refuse resolution or require --ignore-platform-reqs, which is a red flag to carry into a production build. The Symfony DI classes will not bootstrap under Laravel's container regardless. Compatibility with current Assetic releases is also unverified.
Sequencing. Do this work before any AngularJS sunset or Symfony-to-Laravel port begins, not during it. The template-cache generation step is a small, self-contained seam; discovering a cache-key mismatch mid-migration means debugging blank views on every route simultaneously. Migrating the generator first de-risks the larger migration and costs a day at most.
Maintenance. You own it entirely. There is no upstream. Treat the repository as documentation and the license as permission to copy.
Support. None — no issue triage, no security advisories, no compatibility patches. Every PHP minor upgrade becomes a manual verification exercise if the package remains a dependency.
Scaling. Build-time only, so no request-path or memory implications. The scaling concern is dependency-graph hygiene: an abandoned package pulls abandoned transitive dependencies, and that is where supply-chain exposure accumulates. Keeping the dependency after extracting the logic trades a real, ongoing risk for no functional gain.
Failure modes. The dangerous one is silent: a cache-key mismatch produces a $templateCache miss, which surfaces as an HTTP 404 for a partial only when a user navigates to that specific view — invisible in unit tests, intermittent in QA. Second is escaping corruption on templates containing quotes, backslashes, or newlines, which throws at Angular bootstrap time with an unrelated-looking parse error. Third is a stale generated file after template edits, producing "my change didn't deploy" reports. Fourth is Composer resolution failure blocking a PHP upgrade — a whole-team blocker caused by a component worth ~50 lines.
Ramp-up. Hours. The filter is small enough that a mid-level engineer can fully understand and reimplement it in a single sitting, which is precisely why adopting it as a dependency is unjustifiable. The recommendation is unambiguous: use it as a reference implementation, vendor the logic, and do not add it to composer.json.
How can I help you explore Laravel packages today?