jms/google-closure-bundle
JMS Google Closure Bundle integrates Google Closure Compiler with Symfony, providing services and console commands to compile, optimize, and minify JavaScript assets. It helps streamline frontend asset builds and reduce script size using Closure’s optimizations.
Build-vs-buy (or rather, build-vs-replace) for the frontend asset pipeline. The package is a thin Symfony2 shim over Google's Closure Compiler and Closure Templates (Soy). The real decision it forces is whether JS compilation lives inside the PHP deploy pipeline or moves to a modern frontend toolchain (Vite/esbuild, Webpack Encore, or the google-closure-compiler npm package). With 21 stars and zero dependents, the "buy" option is really "adopt an abandoned bridge" — a cost and risk decision, not a capability decision.
Roadmap and platform-modernization prioritization. Presence of this bundle is a reliable fingerprint of a Symfony2-era application. Its discovery should create a backlog item: "Which apps depend on Closure tooling, and what does it cost to migrate them to a supported pipeline?" That directly feeds Symfony 2 → 5/6/7 upgrade planning and tech-debt burn-down.
Feature scoping and lock-in control. Any new feature that deepens the dependency (new Soy templates, new compiler flags, new Assetic build hooks) increases migration cost. Flag those requests as lock-in escalation and route them through a pipeline abstraction instead.
Vendor/support risk classification. No dependents + low health score = unsupported-vendor flag for compliance, security review, and long-term maintenance planning. This is a governance decision as much as a technical one.
Use-case triage for JS optimization. If the actual need is plain minification, this package is overkill and the decision is "already solved by the default stack." If the need is Closure ADVANCED-mode dead-code elimination and renaming, that is a genuinely distinct requirement and should be scoped as its own decision (and likely solved on the npm side).
Consider it only when all of the following hold:
compiler.jar committed, and the team is comfortable operating that.Look elsewhere — or treat it as removal work — when:
For executives. This is a legacy Symfony2-era integration for Google's Closure Tools — an abandoned bridge, not a supported product. It has minimal adoption (21 stars, zero dependents) and no maintenance signal. Recommendation: do not adopt it for any new product or feature, and do not attempt to install it in a Laravel codebase — it is architecturally incompatible and would require a fork-and-rewrite to run. Where it already exists, classify it as end-of-life tech debt and budget migration to a modern asset pipeline. The cost of keeping it is not licensing — it is engineering time to own and patch an orphaned shim, plus the drag it puts on framework upgrades.
For engineering. Treat the package as a narrow, replaceable build-time shim — and be explicit that the portable value is the idea (shelling out to the Closure Compiler and Soy compiler during a build) not the code, which is ~150 lines of process invocation wrapped in dead Symfony2 DI wiring. Do not extend it, do not add features against its APIs, and isolate any surviving usage behind a build-step interface so it can be swapped out. If Closure ADVANCED-mode optimization is a genuine requirement, sponsor a time-boxed spike against google-closure-compiler on npm driven from the existing frontend build — same capability, a maintainable owner, no JVM-in-PHP coupling, and no fork. If the requirement is only minification, close the ticket and confirm Vite/esbuild is already doing the job. Verify maintenance status and Symfony/PHP compatibility before any retention decision, and log a removal task in the modernization backlog either way. The underlying Closure Tools are healthy; only the Symfony integration layer is the risk.
How can I help you explore Laravel packages today?