akuma/distribution-bundle

Maintainers

👁 inri13666

Package info

github.com/inri13666/AkumaDistributionBundle

Homepage

Type:symfony-bundle

pkg:composer/akuma/distribution-bundle

Statistics

Installs: 1 169

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 0

v1.0.4 2017-06-25 10:52 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

WTFPL ee63f734843c990c4e6de7382ebea9994871d19c

  • Nikita Makarov <mesaverde228.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-06 03:17:30 UTC


README

Implements additional way to load bundles without any updates of application files.

Usage

Modify current kernel of application by extending (extends AkumaKernel) from Akuma\Bundle\DistributionBundle\AkumaKernel and result should be merged with parent result, like following:

class AppKernel extends AkumaKernel
{
 public function registerBundles()
 {
 $bundles = array(
 ...
 );

 if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
 ...
 }

 //Following should be replaced to suport list of bundles from AkumaKernel
 return parent::registerBundles($bundles);
 }

Add Resources/config/bundle.yml file to every bundle you want to be auto-registered within application's kernel:

bundle:
 class: 'Acme\Bundle\TestBundle\AcmeTestBundle'
 priority: -1
 kernel: true
 environment: ['test', 'prod']
 require:
 - {class: 'Acme\Bundle\OtherBundle\AcmeOtherBundle', kernel: true}

Where :

  • class - is a main class of Bundle
  • priority - is an integer value
  • kernel - indicates if bundle class require Kernel object as argument for constructor
  • environment - array of environment names to load bundle
  • require - an array of bundles to be loaded

Commands

List registered bundles

Command syntax is akuma:debug:bundle. Displays all registered bundles within application.