PHPackages                             zenstruck/asset-manifest-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. [Templating &amp; Views](/categories/templating)
4. /
5. zenstruck/asset-manifest-bundle

Abandoned → [symfony/framework-bundle](/?search=symfony%2Fframework-bundle)ArchivedSymfony-bundle[Templating &amp; Views](/categories/templating)

zenstruck/asset-manifest-bundle
===============================

Loads an asset manifest to map your assets to dynamic ones.

v1.2.0(9y ago)910.6k1MITPHP

Since Jun 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kbond/ZenstruckAssetManifestBundle)[ Packagist](https://packagist.org/packages/zenstruck/asset-manifest-bundle)[ Docs](http://zenstruck.com/project/ZenstruckAssetManifestBundle)[ RSS](/packages/zenstruck-asset-manifest-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

**NOTE**: This functionality of this bundle is now in [Symfony Core](https://symfony.com/doc/4.0/frontend/encore/versioning.html#loading-assets-from-the-manifest-json-file).

ZenstruckAssetManifestBundle
============================

[](#zenstruckassetmanifestbundle)

[![Build Status](https://camo.githubusercontent.com/c927847d2ab07a13a66e8e9f7514ce17382460e2b4ccba51524319a83ae02e87/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6b626f6e642f5a656e73747275636b41737365744d616e696665737442756e646c652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/kbond/ZenstruckAssetManifestBundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/32a2528a9616628e52a79ade46c7fe2acf2e24d50d4f0b2d7d2428c46b2d2e4a/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6b626f6e642f5a656e73747275636b41737365744d616e696665737442756e646c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kbond/ZenstruckAssetManifestBundle/)[![Code Coverage](https://camo.githubusercontent.com/54657bba6836dbb82df1cd747507660381f7478050a522f128738e6dfd3bc184/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6b626f6e642f5a656e73747275636b41737365744d616e696665737442756e646c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kbond/ZenstruckAssetManifestBundle/)[![SensioLabs Insight](https://camo.githubusercontent.com/778bb939bb82a1044975a10dc093e2bf45b189ec713049a730e41b41c8cbbaa2/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f62366237316336302d363966302d346538332d393930302d6266643330363231636239342e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/b6b71c60-69f0-4e83-9900-bfd30621cb94)[![StyleCI](https://camo.githubusercontent.com/a2caa53cbedef5a8d6bc0a69166936afe9864342bb2280f78cd1b854982af302/68747470733a2f2f7374796c6563692e696f2f7265706f732f35363632363130312f736869656c64)](https://styleci.io/repos/56626101)[![Latest Stable Version](https://camo.githubusercontent.com/071b382761304a9c8a818bafad6c079acda668774696f379924c7c52ed56f9ef/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a656e73747275636b2f61737365742d6d616e69666573742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zenstruck/asset-manifest-bundle)[![License](https://camo.githubusercontent.com/c7181c640a541138d709f6e0edb9b2fa8df55033388c2257d365f1fe34dfbc65/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a656e73747275636b2f61737365742d6d616e69666573742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zenstruck/asset-manifest-bundle)

This bundle adds the twig function `manifest_asset` that is a wrapper for the native `asset`but looks for a configured manifest json file to map assets. This file can be generated using [Gulp](http://gulpjs.com) and the [gulp-rev](https://github.com/sindresorhus/gulp-rev) Gulp plugin. If you have used [Laravel](https://laravel.com/) with [Laravel Elixir](https://github.com/laravel/elixir)the `manifest_asset` function is similar to Laravel's `elixir` function.

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

[](#installation)

Download:

```
composer require zenstruck/asset-manifest-bundle

```

Enabled bundle:

```
//app/AppKernel.php
//...
  public function registerBundles() {
      $bundles = [
          //...
          new Zenstruck\AssetManifestBundle\ZenstruckAssetManifestBundle(),
          //...
      ];
      //...
  }
//...
```

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

[](#configuration)

By default, no manifest is configured. In development, this is probably ideal. For production, you will want to configure a manifest file to map your assets.

```
#app/config/config_prod.yml
#...

zenstruck_asset_manifest:
    manifest_file: "%kernel.root_dir%/../web/assets/manifest.json"

#...
```

Usage
-----

[](#usage)

`asset` should be replaced by `manifest_asset` in twig files.

Here an example:

```
>

    My page title

    My page content

```

**Note**: If no manifest file is configured, the `manifest_asset` behaves exactly like the native `asset` function.

### Prefixes

[](#prefixes)

Say your public (web) folder looks as follows:

```
.
├── assets
│   ├── build
│   │   ├── css
│   │   │   └── app-8f07f52635.css
│   │   └── rev-manifest.json
│   └── css
│       └── app.css

```

And your `rev-manifest.json` file looks as follows:

```
{
    "css/app.css": "css/app-8f07f52635.css"
}
```

Using the `manifest_asset` twig function, you would pass `assets/css/app.css` but this wouldn't map correctly. To fix this, you can add prefixes to your `config.yml`:

```
zenstruck_asset_manifest:
    manifest_file: "%kernel.root_dir%/../web/assets/build/manifest.json"
    prefix:
        source: assets/
        destination: assets/build/
```

Now, `assets/css/app.css` would properly map to `assets/build/css/app-8f07f52635.css`.

Full Default Config
-------------------

[](#full-default-config)

```
zenstruck_asset_manifest:
    manifest_file: ~
    prefix:
        source: ~
        destination: ~
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% 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 ~101 days

Total

3

Last Release

3477d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/707369cc916e0ea1aacbf077dcba464f611cef879f024d8944311a54a15224b3?d=identicon)[kbond](/maintainers/kbond)

---

Top Contributors

[![kbond](https://avatars.githubusercontent.com/u/127811?v=4)](https://github.com/kbond "kbond (13 commits)")[![mcg-web](https://avatars.githubusercontent.com/u/1496283?v=4)](https://github.com/mcg-web "mcg-web (1 commits)")

---

Tags

assetsbundlephpsymfonysymfony-bundletwigjavascriptcssassetgulpfrontendgrunt

### Embed Badge

![Health badge](/badges/zenstruck-asset-manifest-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/zenstruck-asset-manifest-bundle/health.svg)](https://phpackages.com/packages/zenstruck-asset-manifest-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M524](/packages/shopware-core)[symfony/ux-toolkit

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

1682.8k1](/packages/symfony-ux-toolkit)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

566.8M117](/packages/symfony-ux-icons)[shopware/storefront

Storefront for Shopware

674.4M211](/packages/shopware-storefront)

PHPackages © 2026

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