All Projects → irozgar → gulp-rev-versions-bundle

irozgar / gulp-rev-versions-bundle

Licence: MIT license
A bundle that allows symfony to get the version of assets versioned with gulp-rev

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to gulp-rev-versions-bundle

hashed-asset-bundle
Apply an asset version based on a hash of the asset for symfony/asset
Stars: ✭ 24 (+84.62%)
Mutual labels:  bundle, symfony-bundle, cache-busting
Twig Bundle
The Twig Bundle provides configuration for using Twig in your applications.
Stars: ✭ 2,150 (+16438.46%)
Mutual labels:  bundle, symfony-bundle
Sonataadminbundle
The missing Symfony Admin Generator
Stars: ✭ 2,039 (+15584.62%)
Mutual labels:  bundle, symfony-bundle
Gifexceptionbundle
😛 The GhostBuster of your exception page!
Stars: ✭ 197 (+1415.38%)
Mutual labels:  bundle, symfony-bundle
Craueconfigbundle
Database-stored settings made available via a service for your Symfony project.
Stars: ✭ 154 (+1084.62%)
Mutual labels:  bundle, symfony-bundle
Debug Bundle
The DebugBundle allows greater integration of the VarDumper component in the Symfony full-stack framework.
Stars: ✭ 2,033 (+15538.46%)
Mutual labels:  bundle, symfony-bundle
Mercure Bundle
The MercureBundle allows to easily push updates to web browsers and other HTTP clients in the Symfony full-stack framework, using the Mercure protocol.
Stars: ✭ 195 (+1400%)
Mutual labels:  bundle, symfony-bundle
Sonatanotificationbundle
Symfony SonataNotificationBundle
Stars: ✭ 136 (+946.15%)
Mutual labels:  bundle, symfony-bundle
Sonataintlbundle
Symfony SonataIntlBundle
Stars: ✭ 212 (+1530.77%)
Mutual labels:  bundle, symfony-bundle
Victoire
Fullstack Symfony CMS: The perfect mix between a framework and a CMS
Stars: ✭ 227 (+1646.15%)
Mutual labels:  bundle, symfony-bundle
gulp-rev-delete-original
Delete the original file rewritten by gulp-rev.
Stars: ✭ 28 (+115.38%)
Mutual labels:  gulp, gulp-rev
Sonatanewsbundle
Symfony SonataNewsBundle
Stars: ✭ 153 (+1076.92%)
Mutual labels:  bundle, symfony-bundle
Web Profiler Bundle
The WebProfilerBundle provides detailed technical information about each request execution and displays it in both the web debug toolbar and the profiler.
Stars: ✭ 1,905 (+14553.85%)
Mutual labels:  bundle, symfony-bundle
Nelmioapidocbundle
Generates documentation for your REST API from annotations
Stars: ✭ 2,009 (+15353.85%)
Mutual labels:  bundle, symfony-bundle
Consolebundle
Commandline interface in browser for Symfony2
Stars: ✭ 138 (+961.54%)
Mutual labels:  bundle, symfony-bundle
Sonatapagebundle
This bundle provides a Site and Page management through container and block services
Stars: ✭ 181 (+1292.31%)
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 (+1692.31%)
Mutual labels:  bundle, symfony-bundle
Passwordstrengthbundle
Symfony Password strength and blacklisting validator bundle
Stars: ✭ 123 (+846.15%)
Mutual labels:  bundle, symfony-bundle
Webpack Bundle
Bundle to Integrate Webpack into Symfony
Stars: ✭ 124 (+853.85%)
Mutual labels:  bundle, symfony-bundle
Liiphellobundle
[DEPRECATED] Alternative Hello World Bundle for Symfony2 using several FriendsOfSymfony Bundles
Stars: ✭ 206 (+1484.62%)
Mutual labels:  bundle, symfony-bundle

GulpRevVersionsBundle

Build Status SensioLabsInsight

This bundle helps you using your assets versioned with gulp-rev in a symfony project by making the twig function asset return the files mapped in your gulp-rev manifest.

DEPRECATED This bundle is deprecated and will be abandoned when symfony 2.8 support finishes on November 2019. Since version 3.3, symfony includes the option json_manifest_path that does the same as this bundle, I recommend using that instead of this bundle. For previous versions the recommendation is to update symfony to a stable version and start using the option json_manifest_path.

Installation

Step 1. Download with composer

composer require irozgar/gulp-rev-versions-bundle

Step 2. Add the bundle to AppKernel

<?php
// app/AppKernel.php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Irozgar\GulpRevVersionsBundle\IrozgarGulpRevVersionsBundle(),
        );
    }
}

Step 3. Configure your bundle

The configuration of the bundle depends on the symfony version

Symfony version < 3.1

Now you have to make the bundle replace the default version strategy for your assets. To make this add the following to your config.yml file:

# app/config/config.yml

irozgar_gulp_rev_versions:
    replace_default_version_strategy: ~
    
    # This section is needed only if you use symfony packages
    # packages in this list will use the version strategy
    packages:
        - one_package
        - another_package

WARNING If your Symfony version is 3.0 you should be using the versions 1.x of twig because twig 2.0 introduced some changes that broke compatibility with that version of Symfony after its support finished (link).

Symfony version >= 3.1 && < 4.0

This symfony version introduced a new option to configure the version strategy.

Add this to your config.yml to tell symfony what version strategy it should use

# app/config/config.yml

framework:
    # ...
    assets:
        version_strategy: irozgar_gulp_rev_versions.asset.gulp_rev_version_strategy
       
# ...

# This is only needed if using a custom path for the manifest file
irozgar_gulp_rev_versions:
    manifest_path: "your/custom/path/rev-manifest.json"

NOTE Since symfony 3.3 the framework includes a version strategy to load assets using a manifest file. more info

Configuring the manifest file path

The default location of the rev-manifest.json file is app/Resources/assets/rev-manifest.json. You can customize it by adding the following lines to your config.yml

# app/config/config.yml

irozgar_gulp_rev_versions:
    manifest_path: "your/custom/path/rev-manifest.json"

NOTE All paths will be relative to %kernel.root_dir%

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].