symfony-bundles/bundle-dependency

Symfony BundleDependency Component

v1.0.5 2018-02-21 17:57 UTC

This package is auto-updated.

Last update: 2024-12-05 19:00:35 UTC


README

SensioLabsInsight

Build Status Scrutinizer Code Quality Code Coverage Total Downloads Latest Stable Version License

Installation

Pretty simple with Composer, run:

composer require symfony-bundles/bundle-dependency

How to use

  • Add to your composer.json the bundle dependencies
  • Update your composer dependencies with command composer update
  • Modify your Bundle Class. For example:
use Symfony\Component\HttpKernel\Bundle\Bundle;
use SymfonyBundles\BundleDependency\BundleDependency;
use SymfonyBundles\BundleDependency\BundleDependencyInterface;

class MyBundle extends Bundle implements BundleDependencyInterface
{
    use BundleDependency;

    public function getBundleDependencies()
    {
        return [
            'FOS\RestBundle\FOSRestBundle',
            'SymfonyBundles\ForkBundle\SymfonyBundlesForkBundle',
            'SymfonyBundles\RedisBundle\SymfonyBundlesRedisBundle',
        ];
    }
}

If you want override a method build, call the method registerBundleDependencies. For example:

public function build(ContainerBuilder $container)
{
    parent::build($container);
    // ...

    $this->registerBundleDependencies($container);
}