PHPackages                             jszczypk/google-closure-compiler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jszczypk/google-closure-compiler

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jszczypk/google-closure-compiler
================================

Interface to Google Closure Compiler

v1.1.0(2mo ago)07LGPL-3.0-or-laterPHPPHP &gt;=8.1

Since Mar 3Pushed 2mo agoCompare

[ Source](https://github.com/jszczypk/GoogleClosureCompiler)[ Packagist](https://packagist.org/packages/jszczypk/google-closure-compiler)[ RSS](/packages/jszczypk-google-closure-compiler/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Google Closure Compiler PHP Wrapper
===================================

[](#google-closure-compiler-php-wrapper)

A simple PHP wrapper for Google Closure Compiler.

Installation
------------

[](#installation)

```
composer require jszczypk/google-closure-compiler
```

Setup
-----

[](#setup)

Requires PHP 8.1+ and the `curl` extension (for remote compilation).
For local compilation, you need Node and npm package google-closure-compiler.

Usage
-----

[](#usage)

```
use JSzczypk\GoogleClosureCompiler\Compiler;
use JSzczypk\GoogleClosureCompiler\CompilationLevel;

$compiler = new Compiler(
    compilationLevel: CompilationLevel::SIMPLE_OPTIMIZATIONS
);

$yourJavaScriptCode = 'console.log("Hello World!");';

$compiledCode = $compiler->compile($yourJavaScriptCode);
```

### Advanced Usage

[](#advanced-usage)

You can customize `LanguageIn` and `LanguageOut`:

```
use JSzczypk\GoogleClosureCompiler\Compiler;
use JSzczypk\GoogleClosureCompiler\LanguageIn;
use JSzczypk\GoogleClosureCompiler\LanguageOut;
use JSzczypk\GoogleClosureCompiler\CompilationLevel;

$compiler = new Compiler(
    compilationLevel: CompilationLevel::ADVANCED_OPTIMIZATIONS,
    languageIn: LanguageIn::ECMASCRIPT_NEXT,
    languageOut: LanguageOut::ECMASCRIPT5
);
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance86

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Total

2

Last Release

71d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/409167?v=4)[jszczypk](/maintainers/jszczypk)[@jszczypk](https://github.com/jszczypk)

---

Top Contributors

[![jszczypk](https://avatars.githubusercontent.com/u/409167?v=4)](https://github.com/jszczypk "jszczypk (4 commits)")

---

Tags

javascriptclosure-compiler

### Embed Badge

![Health badge](/badges/jszczypk-google-closure-compiler/health.svg)

```
[![Health](https://phpackages.com/badges/jszczypk-google-closure-compiler/health.svg)](https://phpackages.com/packages/jszczypk-google-closure-compiler)
```

###  Alternatives

[tightenco/ziggy

Use your Laravel named routes in JavaScript.

4.3k48.3M329](/packages/tightenco-ziggy)[matthiasmullie/minify

CSS &amp; JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.

2.0k33.1M462](/packages/matthiasmullie-minify)[laracasts/utilities

Transform your PHP to JavaScript

2.2k10.5M60](/packages/laracasts-utilities)[tedivm/jshrink

Javascript Minifier built in PHP

76339.9M180](/packages/tedivm-jshrink)[symfony/ux-turbo

Hotwire Turbo integration for Symfony

3928.2M76](/packages/symfony-ux-turbo)[dkcwd/dkcwd-zf2-munee

Zend Framework 2 module leveraging 'munee' an asset optimisation library developed by Cody Lundquist. You can find munee at http://github.com/meenie/munee

102.1k](/packages/dkcwd-dkcwd-zf2-munee)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
