AssetManager written for zf2. Managing assets for zend framework 2
Clone or download
Pull request Compare This branch is 5 commits ahead, 330 commits behind RWOverdijk:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

AssetManager 1.2.5

By Wesley Overdijk and Marco Pivetta

Note: This version includes a possible BC-break as it has switched to a different tag of assetic.

Build Status


This module is intended for usage with a default directory structure of a ZendSkeletonApplication. It provides functionality to load assets and static files from your module directories through simple configuration. This allows you to avoid having to copy your files over to the public/ directory, and makes usage of assets very similar to what already is possible with view scripts, which can be overridden by other modules. In a nutshell, this module allows you to package assets with your module working out of the box.


  1. Require assetmanager:
./composer.phar require rwoverdijk/assetmanager
#when asked for a version, type "1.*".


Take a look at the wiki for a quick start and more information. A lot, if not all of the topics, have been covered in-dept there.

Sample module config:

return array(
    'asset_manager' => array(
        'resolver_configs' => array(
            'collections' => array(
                'js/d.js' => array(
            'map' => array(
                'specific-path.css' => __DIR__ . '/some/particular/file.css',
        'filters' => array(
            'js/d.js' => array(
                    // Note: You will need to require the classes used for the filters yourself.
                    'filter' => 'JSMin',
        'caching' => array(
            'js/d.js' => array(
                'cache'     => 'Apc',

Please be careful, since this module will serve every file as-is, including PHP code.

Questions / support

If you're having trouble with the asset manager there are a couple of resources that might be of help.


The task list has been slimmed down a lot lately. However, there are still a couple of things that should be done.

  • Warming up the cache
  • Renewing the cache