All Projects → Incenteev → hashed-asset-bundle

Incenteev / hashed-asset-bundle

Licence: MIT license
Apply an asset version based on a hash of the asset for symfony/asset

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to hashed-asset-bundle

Assetic Bundle
[DEPRECATED] This was the recommended way to manage web assets in Symfony 2 applications. Newer Symfony applications should use Webpack Encore.
Stars: ✭ 370 (+1441.67%)
Mutual labels:  assets, bundle, symfony-bundle
gulp-rev-versions-bundle
A bundle that allows symfony to get the version of assets versioned with gulp-rev
Stars: ✭ 13 (-45.83%)
Mutual labels:  bundle, symfony-bundle, cache-busting
Unitymodmanager
一个便捷的程序可以修改游戏内资源包括:Unity游戏资源,Wwise音频资源。
Stars: ✭ 292 (+1116.67%)
Mutual labels:  assets, bundle
Typescript Bundle
A Bundling Tool for TypeScript
Stars: ✭ 94 (+291.67%)
Mutual labels:  assets, bundle
SonataDoctrineMongoDBAdminBundle
Symfony Sonata / Integrate Doctrine MongoDB ODM into the SonataAdminBundle
Stars: ✭ 64 (+166.67%)
Mutual labels:  bundle, symfony-bundle
SonataDashboardBundle
[Abandoned] Provides a Dashboard management through container and block services
Stars: ✭ 17 (-29.17%)
Mutual labels:  bundle, symfony-bundle
django-manifest-loader
Simplifies webpack configuration with Django
Stars: ✭ 105 (+337.5%)
Mutual labels:  assets, cache-busting
Victoire
Fullstack Symfony CMS: The perfect mix between a framework and a CMS
Stars: ✭ 227 (+845.83%)
Mutual labels:  bundle, symfony-bundle
SensioBuzzBundle
No description or website provided.
Stars: ✭ 89 (+270.83%)
Mutual labels:  bundle, symfony-bundle
LiipSearchBundle
[DEPRECATED] Google XML API for searching is discontinued
Stars: ✭ 35 (+45.83%)
Mutual labels:  bundle, symfony-bundle
stampie-bundle
stampie.github.io/
Stars: ✭ 26 (+8.33%)
Mutual labels:  bundle, symfony-bundle
Lexikmaintenancebundle
This Symfony2 bundle allows you to place your website in maintenance mode by calling two commands in your console. A page with status code 503 appears to users, it is possible to authorize certain ips addresses stored in your configuration.
Stars: ✭ 253 (+954.17%)
Mutual labels:  bundle, symfony-bundle
Enqueue Bundle
[READ-ONLY] Message queue bundle for Symfony. RabbitMQ, Amazon SQS, Redis, Service bus, Async events, RPC over MQ and a lot more
Stars: ✭ 233 (+870.83%)
Mutual labels:  bundle, symfony-bundle
fingerprint-brunch
A brunch plugin for cache busting assets
Stars: ✭ 15 (-37.5%)
Mutual labels:  assets, cache-busting
Fmelfinderbundle
📁 ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors
Stars: ✭ 231 (+862.5%)
Mutual labels:  bundle, symfony-bundle
LiipImagineSerializationBundle
Provides integration between LiipImagineBundle and JMSSerializerBundle
Stars: ✭ 24 (+0%)
Mutual labels:  bundle, symfony-bundle
Liiphellobundle
[DEPRECATED] Alternative Hello World Bundle for Symfony2 using several FriendsOfSymfony Bundles
Stars: ✭ 206 (+758.33%)
Mutual labels:  bundle, symfony-bundle
Sonataintlbundle
Symfony SonataIntlBundle
Stars: ✭ 212 (+783.33%)
Mutual labels:  bundle, symfony-bundle
SonataTimelineBundle
[Abandoned] Integrates SpyTimelineBundle into Sonata
Stars: ✭ 24 (+0%)
Mutual labels:  bundle, symfony-bundle
jsonrpc-bundle
JSON-RPC server for Symfony: exposes services registered in the service container as JSON-RPC-webservices
Stars: ✭ 31 (+29.17%)
Mutual labels:  bundle, symfony-bundle

HashedAssetBundle

The HashedAssetBundle provides an asset version strategy which uses a hash of the file content as asset version. This allows bumping the asset version separately for each asset (automatically).

CI Total Downloads Latest Stable Version

Installation

Use Composer to install the bundle:

$ composer require incenteev/hashed-asset-bundle

Usage

Register the bundle in the kernel:

// app/AppKernel.php

// ...

class AppKernel extends Kernel {
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Incenteev\HashedAssetBundle\IncenteevHashedAssetBundle(),
        );
    }
}

Then configure FrameworkBundle to use the new version strategy:

framework:
    assets:
        version_strategy: incenteev_hashed_asset.strategy

Advanced configuration

The default configuration should fit common needs, but the bundle exposes a few configuration settings in case you need them:

incenteev_hashed_asset:
    # Absolute path to the folder in which assets can be found
    # Note: in case you apply a base_path in your asset package, it is not
    # yet applied to the string received by the bundle
    web_root: '%kernel.project_dir%/web'
    # Format used to apply the version. This is equivalent to the
    # `framework > assets > version_format` of the static version strategy
    # of FrameworkBundle.
    version_format: '%%s?%%s'

License

This bundle is under the MIT license.

Alternative projects

If you want to apply cache busting by renaming files in your asset pipeline (for instance with the webpack-encore versioning feature), have a look at the json_manifest strategy available in Symfony itself.

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].