PHPackages                             ashleydawson/multibundle - 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. [Framework](/categories/framework)
4. /
5. ashleydawson/multibundle

ActiveLibrary[Framework](/categories/framework)

ashleydawson/multibundle
========================

Register multiple bundles within the Symfony2 kernel

1.0.2(10y ago)214.3k11MITPHPPHP &gt;=5.3

Since Apr 30Pushed 10y ago1 watchersCompare

[ Source](https://github.com/AshleyDawson/MultiBundle)[ Packagist](https://packagist.org/packages/ashleydawson/multibundle)[ RSS](/packages/ashleydawson-multibundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (1)

Symfony2 MultiBundle
====================

[](#symfony2-multibundle)

[![Build Status](https://camo.githubusercontent.com/c080a08afcc966065f464ed8eeeb091acce7459151c77d437458c8c6a3a30e6b/68747470733a2f2f7472617669732d63692e6f72672f4173686c6579446177736f6e2f4d756c746942756e646c652e737667)](https://travis-ci.org/AshleyDawson/MultiBundle)

Register multiple, dependant bundles within the [Symfony2](http://symfony.com) kernel

Requirements
------------

[](#requirements)

```
 >= PHP 5.3
 >= Symfony Framework 2.3

```

Introduction
------------

[](#introduction)

When developing solutions that use a multi-bundle configuration in Symfony2 - this library provides an unobtrusive way of logically grouping dependant bundles together so that they can be registered with the Symfony kernel in one command.

The reason for building this helper is so that you can manage parallel dependant bundles. Alternatively you could use [bundle inheritance](http://symfony.com/doc/current/cookbook/bundles/inheritance.html) to solve this problem - but that may violate the single responsibility principal as the child bundle may have a different responsibility to its parent.

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

[](#installation)

You can install multi-bundle via Composer. To do that, simply require the package in your composer.json file like so:

```
{
    "require": {
        "ashleydawson/multibundle": "~1.0"
    }
}
```

Run composer update to install the package.

Basic Usage
-----------

[](#basic-usage)

Step one is to extend the AbstractMultiBundle instead of the Bundle that ships with Symfony2. This abstract class allows you to define your grouped bundles as well as expose a registerInto() method for use in the Symfony2 kernel.

```
