mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +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:
@@ -28,7 +28,7 @@ class CollectionDocGenNormalizerTest extends KernelTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->normalizer = self::$container->get(NormalizerInterface::class);
|
||||
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
|
||||
}
|
||||
|
||||
public function testNormalizeFilteredArray(): void
|
||||
|
@@ -35,7 +35,7 @@ final class DocGenObjectNormalizerTest extends KernelTestCase
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->normalizer = self::$container->get(NormalizerInterface::class);
|
||||
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
|
||||
}
|
||||
|
||||
public function testChangeContextOnAttribute()
|
||||
|
@@ -59,7 +59,7 @@ final class BaseContextDataTest extends KernelTestCase
|
||||
NormalizerInterface $normalizer = null
|
||||
): BaseContextData {
|
||||
return new BaseContextData(
|
||||
$normalizer ?? self::$container->get(NormalizerInterface::class)
|
||||
$normalizer ?? self::getContainer()->get(NormalizerInterface::class)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user