PHPackages                             lokhman/silex-assetic - 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. lokhman/silex-assetic

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

lokhman/silex-assetic
=====================

Silex 2.0+ service provider for Assetic library

2.0.2(9y ago)04.8kMITPHP

Since Mar 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/lokhman/silex-assetic)[ Packagist](https://packagist.org/packages/lokhman/silex-assetic)[ RSS](/packages/lokhman-silex-assetic/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

silex-assetic
=============

[](#silex-assetic)

[![StyleCI](https://camo.githubusercontent.com/5b7c79ab41442286bd56ee5c2634ae4814db2100e71651f7bb74de42d13a68d3/68747470733a2f2f7374796c6563692e696f2f7265706f732f38313936333731312f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/81963711)

Service provider to support [Assetic](https://github.com/kriswallsmith/assetic) library for [**Silex 2.0+**](http://silex.sensiolabs.org/) micro-framework.

> This project is a part of [`silex-tools`](https://github.com/lokhman/silex-tools) library.

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

[](#installation)

You can install `silex-assetic` with [Composer](http://getcomposer.org):

```
composer require lokhman/silex-assetic

```

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

[](#documentation)

Register `AsseticServiceProvider` in your application with the following code:

```
use Lokhman\Silex\Provider\AsseticServiceProvider;

$app->register(new AsseticServiceProvider());

```

**N.B.:** Assetic will always be in debug mode if `$app['debug']` is `TRUE`.

### Configuration

[](#configuration)

Configuration is mostly the same as you have for [AsseticBundle](http://symfony.com/doc/current/reference/configuration/assetic.html) in Symfony framework.

```
"assetic.options": {
    "prefix": "/",
    "input_dir": "src",
    "output_dir": "web",
    "cache_dir": "cache/assetic",
    "twig_functions": [],
    "java": "/usr/bin/java",
    "ruby": "/usr/bin/ruby",
    "node": "/usr/bin/node",
    "node_paths": [],
    "filters": {
        "some_filter": {}
    },
    "assets": {
        "some_asset": {
            "inputs": [],
            "filters": [],
            "options": {}
        }
    }
}

```

### Filters

[](#filters)

Filters are defined in `FilterFactory` class and mirror names and options of [AsseticBundle](http://symfony.com/doc/current/assetic/asset_management.html#filters).

### Twig

[](#twig)

Twig extension is enabled automatically if you have `TwigServiceProvider` registered for the application.

### Console

[](#console)

You can use console command with [`silex-console`](https://github.com/lokhman/silex-console) service provider simply adding `DumpCommand` to the console application.

```
use Lokhman\Silex\Console\Console;
use Lokhman\Silex\Console\Command\Assetic\DumpCommand;

$console = new Console($app);
$console->add(new DumpCommand());
$console->run();

```

### Further reading

[](#further-reading)

For more details please refer to the [asset management documentation](http://symfony.com/doc/current/assetic/asset_management.html) of Symfony framework.

License
------------------------------------------

[](#license)

Library is available under the MIT license. The included LICENSE file describes this in detail.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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

Every ~6 days

Total

3

Last Release

3398d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17a4b2bb3c64905c2663115cb0a3ef36854123b51709645576a591fb72fbef10?d=identicon)[lokhman](/maintainers/lokhman)

---

Top Contributors

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

---

Tags

asseticsilextoolsassetictoolssilex

### Embed Badge

![Health badge](/badges/lokhman-silex-assetic/health.svg)

```
[![Health](https://phpackages.com/badges/lokhman-silex-assetic/health.svg)](https://phpackages.com/packages/lokhman-silex-assetic)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[symfony/stimulus-bundle

Integration with your Symfony app &amp; Stimulus!

17417.5M295](/packages/symfony-stimulus-bundle)[illuminate/session

The Illuminate Session package.

9939.3M850](/packages/illuminate-session)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[brianhenryie/strauss

Prefixes dependencies namespaces so they are unique to your plugin

190438.1k36](/packages/brianhenryie-strauss)

PHPackages © 2026

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