From 31a0669cf5f027827f2d905803f1f49d8fc619d3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 4 Nov 2015 18:39:52 +0100 Subject: [PATCH] [HttpKernel] Keep 3.0 compat by not using ContainerAware --- .../Component/HttpKernel/Bundle/Bundle.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php index b1abca5237..5dfc6ceb27 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -11,7 +11,7 @@ namespace Symfony\Component\HttpKernel\Bundle; -use Symfony\Component\DependencyInjection\ContainerAware; +use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\Console\Application; @@ -24,8 +24,12 @@ use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; * * @author Fabien Potencier */ -abstract class Bundle extends ContainerAware implements BundleInterface +abstract class Bundle implements BundleInterface { + /** + * @var ContainerInterface + */ + protected $container; protected $name; protected $extension; protected $path; @@ -58,6 +62,16 @@ abstract class Bundle extends ContainerAware implements BundleInterface { } + /** + * Sets the container. + * + * @param ContainerInterface|null $container A ContainerInterface instance or null + */ + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + /** * Returns the bundle's container extension. *