PHPackages                             apnet/assetic-importer-bundle - 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. apnet/assetic-importer-bundle

AbandonedArchivedSymfony-bundle[Utility &amp; Helpers](/categories/utility)

apnet/assetic-importer-bundle
=============================

Integrates resource projects into Symfony2

1.4.0(9y ago)11.5k4MITPHPPHP &gt;=5.3.0

Since Apr 6Pushed 9y agoCompare

[ Source](https://github.com/apnet/AsseticImporterBundle)[ Packagist](https://packagist.org/packages/apnet/assetic-importer-bundle)[ RSS](/packages/apnet-assetic-importer-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (18)Versions (11)Used By (4)

Assetic Importer Bundle
=======================

[](#assetic-importer-bundle)

[![Travis-ci status](https://camo.githubusercontent.com/9f7026971a6cbc0bb4d0670194856ecf0e2b1ecd613a4a60d676211e469f969d/68747470733a2f2f7472617669732d63692e6f72672f61706e65742f41737365746963496d706f7274657242756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/apnet/AsseticImporterBundle/) [![SensioLabsInsight](https://camo.githubusercontent.com/25868d43f0fa2725aa19d6e58873d107579852d4c2adaa0864c958128a05a912/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f34663761353764352d356263372d346132342d616161382d6664326438313265633166632f6d696e692e706e67)](https://insight.sensiolabs.com/projects/4f7a57d5-5bc7-4a24-aaa8-fd2d812ec1fc)

The main purpose of a `Bundle` is to exclude `cssrewrite` filter and to bypass known issue that causes the `cssrewrite` to fail when using the `@AcmeFooBundle` syntax for CSS Stylesheets.

`Bundle` allows you to import files from non-public directories via `assetic` directly into `routing`. These files can either be a result of an `external program`, or created on the fly from `Symfony`. `Bundle` и `assetic` keep track of changes to files automatically on every request.

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

[](#installation)

Add requirements to composer.json:

```
{
  "require" : {
    "apnet/assetic-importer-bundle" : "~1.0"
  }
}
```

Register the bundle
-------------------

[](#register-the-bundle)

Register the bundle in the `AppKernel.php` file

```
// ...other bundles ...
$bundles[] = new Apnet\AsseticImporterBundle\ApnetAsseticImporterBundle();
if ($this->getEnvironment() == 'dev') {
    // ...other bundles ...
    $bundles[] = new Apnet\AsseticWatcherBundle\ApnetAsseticWatcherBundle();
}
```

Configuration
-------------

[](#configuration)

Let's assume that you have two directories inside `app/Resources`:

1. `app/Resources/simple_dir` with `style1.css` file
2. `app/Resources/compass_dir` with `config.rb` and all other compass-project files (e.g. `sass/style2.scss` and `stylesheets/style2.css`)

Then add the configuration into your `config.yml`

```
apnet_assetic_importer:
    assets:
        dir1:
            source: %kernel.root_dir%/Resources/simple_dir
            target: example1
        dir2:
            source: %kernel.root_dir%/Resources/compass_dir/config.rb
            target: example2
            importer: compass
```

After these changes two css files will be accessible via `/app_dev.php`

1. `/app_dev.php/example1/style1.css`
2. `/app_dev.php/example2/stylesheets/style2.css`. Also all files inside `css_dir`, `images_dir`, `javascripts_dir`, `fonts_dir` will ba available. `sass_dir` directory contents will be private.

All files will be dumped with `assetic:dump` command.

Twig
----

[](#twig)

To include your CSS into Twig template use **imported\_asset** function:

```

```

Assetic Watcher Bundle
======================

[](#assetic-watcher-bundle)

Actualy there are two bundles inside `apnet/assetic-importer-bundle`:

1. Apnet\\AsseticImporterBundle
2. Apnet\\AsseticWatcherBundle

Watcher is a tool, that could be used with `dev` environment to compile compass project without any external file watchers or IDE.

- Of course Apache user needs write permissions to the `compass_dir/stylesheets` directory

`AsseticWatcherBundle` is disabled by default.

Configuration
-------------

[](#configuration-1)

First, to enable Assetic Watcher add these lines to `config_dev.yml`

```
apnet_assetic_watcher:
    compiler_root: %kernel.root_dir%/Resources
    enabled: true
```

And second, add `watcher` parameter to imported asset configuration in `config.yml`

```
apnet_assetic_importer:
    assets:
        # ...
        dir2:
            source: %kernel.root_dir%/Resources/compass_dir/config.rb
            target: example2
            importer: compass
            watcher: true
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

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

Every ~91 days

Recently: every ~194 days

Total

10

Last Release

3597d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fd7f833537e59f3a0275ec881051e8d08ee9b658025f675f201228956da8a3e0?d=identicon)[covex-nn](/maintainers/covex-nn)

---

Top Contributors

[![covex-nn](https://avatars.githubusercontent.com/u/110878?v=4)](https://github.com/covex-nn "covex-nn (87 commits)")

---

Tags

csssassscssasseticcompass

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/apnet-assetic-importer-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/apnet-assetic-importer-bundle/health.svg)](https://phpackages.com/packages/apnet-assetic-importer-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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