PHPackages                             erfans/asset-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. erfans/asset-bundle

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

erfans/asset-bundle
===================

Symfony bundle to install third party assets.

1.4.0(7y ago)119MITPHPPHP &gt;=7.1

Since Aug 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Erfans/AssetBundle)[ Packagist](https://packagist.org/packages/erfans/asset-bundle)[ RSS](/packages/erfans-asset-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (2)Versions (4)Used By (0)

The purpose of this bundle is to manage third party assets for reusable bundles.

Motivation
==========

[](#motivation)

As it is mentioned in Symfony [documentation](https://symfony.com/doc/master/bundles/best_practices.html#vendors):

> A bundle should also not embed third-party libraries written in JavaScript, CSS or any other language.

Additionally due to license restrictions and conflicts a bundle may could not include third party assets (e.g. [FOSCKEditorBundle](http://symfony.com/doc/master/bundles/FOSCKEditorBundle/usage/ckeditor.html)).

To solve this situation, a bundle could only contain a configuration and by running a command line this bundle will install the configured assets.

This bundle allows to define multiple agents (downloader or installer) service and tag them with `erfans_asset.agent`and add `alias` attribute to use them in the installing process. Bundles can contain asset config files to install assets by proper agent. (By now only Bower and File agents have been implemented.)

Installation
============

[](#installation)

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require erfans/asset-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require erfans/asset-bundle
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `app/AppKernel.php` file of your project:

```
