PHPackages                             loginwashere/php-closure - 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. loginwashere/php-closure

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

loginwashere/php-closure
========================

Fork of php closure class for working with google closure compiler api

0.0.1(13y ago)135Apache-2.0PHPPHP &gt;=5.3

Since Feb 10Pushed 13y ago1 watchersCompare

[ Source](https://github.com/loginwashere/PhpClosure)[ Packagist](https://packagist.org/packages/loginwashere/php-closure)[ RSS](/packages/loginwashere-php-closure/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

PhpClosure
==========

[](#phpclosure)

[![Build Status](https://camo.githubusercontent.com/9e23001f0b5cd88bade1fd541897330b78f3198a2826c75852d126540b43c460/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6c6f67696e776173686572652f506870436c6f737572652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/loginwashere/PhpClosure)

This is a fork of [php-closure](http://code.google.com/p/php-closure/) class for working with google closure compiler api that I found on Google Code

Documentation
-------------

[](#documentation)

Will be available on [phpclosure.readthedocs.org](https://phpclosure.readthedocs.org/en/latest/)

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

[](#installation)

It is assumed that library will be used with composer, so installation steps are:

1. Install [composer](http://getcomposer.org/doc/00-intro.md)
2. Add resent wersion of library to composer.json of your project.

```
{
    "require": {
        "loginwashere/php-closure": "*"
    }
}
```

3. run command `php path/to/composer.phar install` (or `php path/to/composer.phar update` - if you've already executed install)

Usage
-----

[](#usage)

```
$c = new PhpClosure();
$c->add("path/to/js/my-app.js") // File must exist and be readable
    ->add("path/to/js/popup.js") // File must exist and be readable
    ->advancedMode()
    ->useClosureLibrary()
    ->cacheDir("path/to/tmp/js-cache/") // Directory must exist and be writable
    ->write();
```

or

```
PhpClosure::create()
    ->add("path/to/js/my-app.js") // File must exist and be readable
    ->add("path/to/js/popup.js") // File must exist and be readable
    ->advancedMode()
    ->useClosureLibrary()
    ->cacheDir("path/to/tmp/js-cache/") // Directory must exist and be writable
    ->write();
```

For compiler options description go to [official documentation](https://developers.google.com/closure/compiler/docs/overview)

### Todo

[](#todo)

- Add tests
- Add file manipulation errors handling

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

4845d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fdcb567deb27c46199c2f60aae97443a0d3e89630457e668324bbdc40807864d?d=identicon)[loginwashere](/maintainers/loginwashere)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/loginwashere-php-closure/health.svg)

```
[![Health](https://phpackages.com/badges/loginwashere-php-closure/health.svg)](https://phpackages.com/packages/loginwashere-php-closure)
```

###  Alternatives

[hyperf/engine-swow

Coroutine engine provided by swow.

1642.9k7](/packages/hyperf-engine-swow)

PHPackages © 2026

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