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:
2023-12-14 23:36:56 +01:00
parent 4a99480f50
commit 1098bafd3d
248 changed files with 631 additions and 628 deletions

View File

@@ -28,9 +28,9 @@ final class PersonDuplicateControllerViewTest extends WebTestCase
self::bootKernel();
/** @var EntityManagerInterface $em */
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
/** @var CenterRepositoryInterface $centerRepository */
$centerRepository = self::$container->get(CenterRepositoryInterface::class);
$centerRepository = self::getContainer()->get(CenterRepositoryInterface::class);
$center = $centerRepository->findOneBy(['name' => 'Center A']);
$person = (new Person())