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.0.0(2mo ago)04LGPL-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 1mo ago

READMEChangelog (1)DependenciesVersions (2)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

36

—

LowBetter than 82% of packages

Maintenance86

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

69d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59f0174beece96bc4218341c040ed2cafe80f7040a0fb8191bd8566b433e0537?d=identicon)[jszczypk](/maintainers/jszczypk)

---

Top Contributors

[![jszczypk](https://avatars.githubusercontent.com/u/409167?v=4)](https://github.com/jszczypk "jszczypk (3 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.3k41.6M267](/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.0k30.5M336](/packages/matthiasmullie-minify)[laracasts/utilities

Transform your PHP to JavaScript

2.2k10.0M39](/packages/laracasts-utilities)[tedivm/jshrink

Javascript Minifier built in PHP

76137.7M139](/packages/tedivm-jshrink)[symfony/ux-turbo

Hotwire Turbo integration for Symfony

3906.8M47](/packages/symfony-ux-turbo)[tecnickcom/tc-lib-color

PHP library to manipulate various color representations

247.2M9](/packages/tecnickcom-tc-lib-color)

PHPackages © 2026

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