mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 18:13:48 +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:
@@ -29,8 +29,8 @@ final class DoctrineExistingEntityNormalizerTest extends KernelTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
$serializerFactory = self::$container->get(ClassMetadataFactoryInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
$serializerFactory = self::getContainer()->get(ClassMetadataFactoryInterface::class);
|
||||
|
||||
$this->normalizer = new DoctrineExistingEntityNormalizer($em, $serializerFactory);
|
||||
}
|
||||
@@ -39,7 +39,7 @@ final class DoctrineExistingEntityNormalizerTest extends KernelTestCase
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$userIds = self::$container->get(EntityManagerInterface::class)
|
||||
$userIds = self::getContainer()->get(EntityManagerInterface::class)
|
||||
->getRepository(User::class)
|
||||
->createQueryBuilder('u')
|
||||
->select('u.id')
|
||||
|
Reference in New Issue
Block a user