mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-07 23:34:58 +00:00
Replaced the deprecated 'self::$container->get' with 'self::getContainer()->get' using rector
This change is made to comply with the new Symfony standards and to avoid deprecation warnings for future versions. The update touches various functionalities, including retrieving EntityManagerInterface instance and various service classes within the test files.
This commit is contained in:
@@ -24,9 +24,9 @@ abstract class AbstractAggregatorTest extends KernelTestCase
|
||||
{
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
if (null !== self::$container) {
|
||||
if (null !== self::getContainer()) {
|
||||
/** @var EntityManagerInterface $em */
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
$em->getConnection()->close();
|
||||
}
|
||||
self::ensureKernelShutdown();
|
||||
|
@@ -35,9 +35,9 @@ abstract class AbstractFilterTest extends KernelTestCase
|
||||
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
if (null !== self::$container) {
|
||||
if (null !== self::getContainer()) {
|
||||
/** @var EntityManagerInterface $em */
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
$em->getConnection()->close();
|
||||
}
|
||||
self::ensureKernelShutdown();
|
||||
|
Reference in New Issue
Block a user