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
Google Closure Bundle

Google Closure Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Eases development with the Google Closure Tools in Symfony2

Frequently asked questions about Google Closure Bundle
Can I install jms/google-closure-bundle in a Laravel application?
No. It is a Symfony2-era bundle with Symfony DI Extension and CompilerPass wiring, Assetic filters, and console commands, but no Laravel service provider or facade. Its symfony/* 2.x constraints conflict with the Symfony 6/7 components used by modern Laravel, so Composer resolution will fail or force downgrades. Making it work in Laravel would require a fork and reimplementation, not a normal install.
What does jms/google-closure-bundle actually do?
It integrates Google Closure Compiler into Symfony applications through bundle configuration, container services, Assetic filters, and console commands. It helps compile, minify, and optimize JavaScript assets with configurable optimization levels for development and production. It is not a Laravel asset pipeline and does not provide Laravel-specific integration points.
Is jms/google-closure-bundle compatible with Laravel 10 or Laravel 11?
No. The package is a Symfony2 bundle from the 2011–2013 era, and Symfony2 is end-of-life. Modern Laravel uses a service provider and Vite-based asset pipeline, neither of which this bundle provides. Its dependency graph also collides with the Symfony 6/7 components required by Laravel 10 and 11.
What should I use instead of JMSGoogleClosureBundle for JavaScript minification in Laravel?
Use Vite with laravel-vite-plugin, which uses esbuild by default, or configure terser if you need different minification behavior. If you specifically need Google Closure Compiler, use the google-closure-compiler npm package as a Vite or Rollup plugin, or as a standalone build script. Avoid invoking a JAR from PHP unless there is a hard requirement that cannot be met in the frontend build pipeline.
Does jms/google-closure-bundle require Java or a JVM?
Yes. The bundle drives Google Closure Compiler, typically via a compiler.jar, so developer machines and CI runners need a JVM and a pinned JAR. That adds onboarding and build-infrastructure overhead. Modern npm-distributed Closure Compiler tooling avoids some legacy packaging issues, but it still runs the compiler as part of the build.
Can I use Google Closure Compiler ADVANCED mode from Laravel?
Yes, but not through this bundle. Use the google-closure-compiler npm package or CLI in a Vite, Rollup, or standalone build step. ADVANCED mode performs dead-code elimination and renaming, so it requires export discipline such as goog.exportSymbol or @export. If ordinary minification is sufficient, esbuild or terser is simpler and needs no JVM.
Is jms/google-closure-bundle maintained or safe for production?
It has no active maintenance, depends on end-of-life Symfony2 components, and has a very small user base with no meaningful dependent ecosystem. There is no security response path, so production use carries high technical risk. Treat its presence as a diagnostic signal of a legacy Symfony2 asset pipeline rather than as a dependency to add.
How do I test whether a legacy application depends on JMSGoogleClosureBundle?
Inspect composer.json and composer.lock for jms/google-closure-bundle and symfony/* 2.x constraints, then check Symfony bundle registration, Assetic filters, console commands, and configuration. Search templates and bundles for the Closure pass and for goog.exportSymbol or @export usage, which indicates whether ADVANCED mode is genuinely load-bearing. That inventory tells you whether migration is a simple minifier swap or a larger asset-pipeline rewrite.
What about Closure Templates or Soy support?
Closure Templates was renamed and split into Soy, and it should be scoped separately from JavaScript minification. Use a Soy npm toolchain in the build pipeline rather than a PHP-side integration. The bundle's Closure Templates angle does not make it Laravel-ready or reduce the need for a separate migration decision.
What is the migration path off JMSGoogleClosureBundle for a Laravel or Symfony application?
First inventory which templates and bundles depend on the Closure pass and whether ADVANCED-mode optimization is genuinely required. Replace ordinary minification with Vite, esbuild, or terser; if Closure-specific behavior is required, use google-closure-compiler npm tooling as a build plugin or standalone script. For legacy Symfony applications, combine that with a Symfony upgrade and asset-pipeline modernization; for Laravel, reimplement the capability rather than integrating the bundle.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections