PHPackages                             a3gz/assets-dispatcher - 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. a3gz/assets-dispatcher

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

a3gz/assets-dispatcher
======================

Dispatch versioned assets.

1.0.0(8y ago)03.2kMITPHP

Since Feb 10Pushed 6y agoCompare

[ Source](https://github.com/a3gz/assets-dispatcher)[ Packagist](https://packagist.org/packages/a3gz/assets-dispatcher)[ Docs](https://github.com/a3gz/xs-dispatcher)[ RSS](/packages/a3gz-assets-dispatcher/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (3)Used By (0)

Assets Dispatcher
=================

[](#assets-dispatcher)

Install
-------

[](#install)

```
composer require a3gz/assets-dispatcher

```

How to use
----------

[](#how-to-use)

Please, check out the included demo.

What does it do?
----------------

[](#what-does-it-do)

**Assets Dispatcher** offers a way to easily minify-and-cache-once Javascript and CSS assets on-the-fly.

The full sized assets don't need to be below `public_html`; the PHP dispatcher will:

1. Attempt to dispatch a minified version of the requested asset.
2. If the above fails, look for the original non-minified file, create the minified version and dispatch the resulting file.

Evidently, Assets Dispatcher isn't the fastest way to serve Javascript/CSS files because even when there's a minified version available, everything is resolved by a PHP program. For this reason the use proposed in the demo may not be a convenient setup.

Assets Dispatcher as an automated minifier
------------------------------------------

[](#assets-dispatcher-as-an-automated-minifier)

An alternative use we can have for **Assets Dispatcher** is that of an automated minifier. Please, take a look at `demo-alt` for details.

In this setup, instead of using a PHP dispatcher to serve the assets, we use it to generate the minified versions of all the resources. In the `demo-alt` we do this via a PHP file that we have to HTTP GET, but in a real situation we would use a cron job instead.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

3065d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71a4c7affb109a5e4a15bdeaf55b70e268d59b0101c8ebacf899cb8e237c4950?d=identicon)[a3gz](/maintainers/a3gz)

---

Top Contributors

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

---

Tags

phpjs dispatchercss dispatcher

### Embed Badge

![Health badge](/badges/a3gz-assets-dispatcher/health.svg)

```
[![Health](https://phpackages.com/badges/a3gz-assets-dispatcher/health.svg)](https://phpackages.com/packages/a3gz-assets-dispatcher)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21623.4k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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