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

Skip to content

Commit e337ce6

Browse files
committed
Remove deprecated ContainerAware class and make use of the trait in another class
1 parent 52c50e3 commit e337ce6

File tree

3 files changed

+2
-51
lines changed

3 files changed

+2
-51
lines changed

src/Symfony/Bridge/Doctrine/ManagerRegistry.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Bridge\Doctrine;
1313

1414
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15-
use Symfony\Component\DependencyInjection\ContainerInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1616
use Doctrine\Common\Persistence\AbstractManagerRegistry;
1717

1818
/**
@@ -22,10 +22,7 @@
2222
*/
2323
abstract class ManagerRegistry extends AbstractManagerRegistry implements ContainerAwareInterface
2424
{
25-
/**
26-
* @var ContainerInterface
27-
*/
28-
protected $container;
25+
use ContainerAwareTrait;
2926

3027
/**
3128
* {@inheritdoc}
@@ -42,12 +39,4 @@ protected function resetService($name)
4239
{
4340
$this->container->set($name, null);
4441
}
45-
46-
/**
47-
* {@inheritdoc}
48-
*/
49-
public function setContainer(ContainerInterface $container = null)
50-
{
51-
$this->container = $container;
52-
}
5342
}

src/Symfony/Component/DependencyInjection/ContainerAware.php

Lines changed: 0 additions & 37 deletions
This file was deleted.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\HttpKernel\Bundle;
1313

14-
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
1514
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1615
use Symfony\Component\DependencyInjection\ContainerBuilder;
1716
use Symfony\Component\DependencyInjection\Container;

0 commit comments

Comments
 (0)