symfony-bundles / bundle-dependency
Symfony BundleDependency Component
Installs: 116 803
Dependents: 7
Suggesters: 0
Security: 0
Stars: 19
Watchers: 7
Forks: 0
Open Issues: 1
Requires
- php: >=5.6
Requires (Dev)
- doctrine/annotations: ~1.1
- phpunit/php-code-coverage: ^3.3.0|^4.0
- phpunit/phpunit: ^5.3
- symfony/framework-bundle: ~2.7|~3.0
README
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); }