8000 minor #16466 [HttpKernel] Keep 3.0 compat by not using ContainerAware… · symfony/symfony@df9d082 · GitHub
[go: up one dir, main page]

Skip to content

Commit df9d082

Browse files
committed
minor #16466 [HttpKernel] Keep 3.0 compat by not using ContainerAware (nicolas-grekas)
This PR was merged into the 2.8 branch. Discussion ---------- [HttpKernel] Keep 3.0 compat by not using ContainerAware | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 31a0669 [HttpKernel] Keep 3.0 compat by not using ContainerAware
2 parents 7beea17 + 31a0669 commit df9d082

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 <fabien@symfony.com>
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)
0