Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 31a0669

Browse files
[HttpKernel] Keep 3.0 compat by not using ContainerAware
1 parent 7beea17 commit 31a0669

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/Symfony/Component/HttpKernel/Bundle/Bundle.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\HttpKernel\Bundle;
1313

14-
use Symfony\Component\DependencyInjection\ContainerAware;
14+
use Symfony\Component\DependencyInjection\ContainerInterface;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\DependencyInjection\Container;
1717
use Symfony\Component\Console\Application;
@@ -24,8 +24,12 @@
2424
*
2525
* @author Fabien Potencier <[email protected]>
2626
*/
27-
abstract class Bundle extends ContainerAware implements BundleInterface
27+
abstract class Bundle implements BundleInterface
2828
{
29+
/**
30+
* @var ContainerInterface
31+
*/
32+
protected $container;
2933
protected $name;
3034
protected $extension;
3135
protected $path;
@@ -58,6 +62,16 @@ public function build(ContainerBuilder $container)
5862
{
5963
}
6064

65+
/**
66+
* Sets the container.
67+
*
68+
* @param ContainerInterface|null $container A ContainerInterface instance or null
69+
*/
70+
public function setContainer(ContainerInterface $container = null)
71+
{
72+
$this->container = $container;
73+
}
74+
6175
/**
6276
* Returns the bundle's container extension.
6377
*

0 commit comments

Comments
 (0)