PHPackages                             wake/silex-twig-assetic-integration-provider - 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. [Templating &amp; Views](/categories/templating)
4. /
5. wake/silex-twig-assetic-integration-provider

ActiveLibrary[Templating &amp; Views](/categories/templating)

wake/silex-twig-assetic-integration-provider
============================================

An integration library of Twig and Assetic works for Silex.

v0.2.0(10y ago)110MITPHP

Since Oct 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/wake/Silex-Twig-Assetic-Integration-Provider)[ Packagist](https://packagist.org/packages/wake/silex-twig-assetic-integration-provider)[ Docs](https://github.com/wake/Twig-Assetic-Integration-Provider)[ RSS](/packages/wake-silex-twig-assetic-integration-provider/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Silex Twig Assetic Integration Provider
=======================================

[](#silex-twig-assetic-integration-provider)

This is an integration library of [Twig](http://twig.sensiolabs.org) and [Assetic](https://github.com/kriswallsmith/assetic) works for [Silex](http://silex.sensiolabs.org/).

The original [Twig extension of Assetic](https://github.com/kriswallsmith/assetic#twig) is not easy to use. There's a lot of work (code) to do and you need always to know which templates require assets.

This integration library will handle it automatically.

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

[](#installation)

Add in your `composer.json` with following require entry:

```
{
  "require": {
    "wake/Silex-Twig-Assetic-Integration-Provider": "*"
  }
}
```

or using composer:

```
$ composer require wake/Silex-Twig-Assetic-Integration-Provider:*
```

then run `composer install` or `composer update`.

Registering
-----------

[](#registering)

```
$app->register (new Silex\Provider\TwigAsseticIntegrationProvider (), array (
  'assetic.asset.root'        => 'your_asset_files_root',
  'assetic.asset.output_root' => 'your_asset_output_root',
  'assetic.debug'             => false,
  'assetic.filter'            => array (
    'sass'    => new \Assetic\Filter\SassFilter ('/path/to/parser/sass'),
    'yui_css' => new \Assetic\Filter\Yui\CssCompressorFilter ('/path/to/yuicompressor.jar')
  )
));
```

Important: Make sure you are using [TwigServiceProvider](http://silex.sensiolabs.org/doc/providers/twig.html) and have registered before this code. It override some Twig loaders to force it expode some template information.

Usage
-----

[](#usage)

Just as [Assetic twig extension](https://github.com/kriswallsmith/assetic#twig)

```
{% stylesheets '/path/to/sass/main.sass' filter='sass,?yui_css' output='css/all.css' %}

{% endstylesheets %}
```

Filter Auto Detecting
---------------------

[](#filter-auto-detecting)

Twig Assetic Integration Provider provides [Assetic filters](https://github.com/kriswallsmith/assetic#filters) auto detecting as below list:

### CssMinFilter

[](#cssminfilter)

- Description: Minifies CSS
- Filter name: `cssmin`
- Requirement: [natxet/CssMin](https://github.com/natxet/CssMin)

### CssRewriteFilter

[](#cssrewritefilter)

- Description: Fixes relative URLs in CSS assets when moving to a new URL
- Filter name: `cssrewrite`

Feedback
--------

[](#feedback)

Please feel free to open an issue and let me know if there is any thoughts or questions 😃

License
-------

[](#license)

Released under the MIT license

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

3916d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7224160511f2f5bc6da7c7291c93c8336ada313c5b13d8d50827f95d75808d1f?d=identicon)[Wake](/maintainers/Wake)

---

Top Contributors

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

---

Tags

twigasseticsilex

### Embed Badge

![Health badge](/badges/wake-silex-twig-assetic-integration-provider/health.svg)

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

###  Alternatives

[symfony/ux-twig-component

Twig components for Symfony

22018.6M330](/packages/symfony-ux-twig-component)[symfony/ux-live-component

Live components for Symfony

1647.0M122](/packages/symfony-ux-live-component)[symfony/ux-toolkit

A tool to easily create a design system in your Symfony app with customizable, well-crafted Twig components

16126.1k1](/packages/symfony-ux-toolkit)[mati365/ckeditor5-symfony

CKEditor 5 integration for Symfony

261.9k](/packages/mati365-ckeditor5-symfony)

PHPackages © 2026

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