You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DependencyInjection/FrameworkExtension.php
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -206,7 +206,7 @@ public function load(array $configs, ContainerBuilder $container)
206
206
// default in the Form and Validator component). If disabled, an identity
207
207
// translator will be used and everything will still work as expected.
208
208
if ($this->isConfigEnabled($container, $config['translator']) || $this->isConfigEnabled($container, $config['form']) || $this->isConfigEnabled($container, $config['validation'])) {
209
-
if (!class_exists('Symfony\Component\Translation\Translator') && $this->isConfigEnabled($container, $config['translator'])) {
209
+
if (!class_exists(Translator::class) && $this->isConfigEnabled($container, $config['translator'])) {
210
210
thrownewLogicException('Translation support cannot be enabled as the Translation component is not installed. Try running "composer require symfony/translation".');
211
211
}
212
212
@@ -289,14 +289,14 @@ public function load(array $configs, ContainerBuilder $container)
if ($this->isConfigEnabled($container, $config['serializer'])) {
379
-
if (!class_exists('Symfony\Component\Serializer\Serializer')) {
379
+
if (!class_exists(\Symfony\Component\Serializer\Serializer::class)) {
380
380
thrownewLogicException('Serializer support cannot be enabled as the Serializer component is not installed. Try running "composer require symfony/serializer-pack".');
381
381
}
382
382
@@ -1114,18 +1114,18 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
1114
1114
$dirs = [];
1115
1115
$transPaths = [];
1116
1116
$nonExistingDirs = [];
1117
-
if (class_exists('Symfony\Component\Validator\Validation')) {
1118
-
$r = new \ReflectionClass('Symfony\Component\Validator\Validation');
1117
+
if (class_exists(\Symfony\Component\Validator\Validation::class)) {
1118
+
$r = new \ReflectionClass(\Symfony\Component\Validator\Validation::class);
@@ -1208,7 +1208,7 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
1208
1208
return;
1209
1209
}
1210
1210
1211
-
if (!class_exists('Symfony\Component\Validator\Validation')) {
1211
+
if (!class_exists(\Symfony\Component\Validator\Validation::class)) {
1212
1212
thrownewLogicException('Validation support cannot be enabled as the Validator component is not installed. Try running "composer require symfony/validator".');
1213
1213
}
1214
1214
@@ -1272,8 +1272,8 @@ private function registerValidatorMapping(ContainerBuilder $container, array $co
@@ -1334,7 +1334,7 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
1334
1334
return;
1335
1335
}
1336
1336
1337
-
if (!class_exists('Doctrine\Common\Annotations\Annotation')) {
1337
+
if (!class_exists(\Doctrine\Common\Annotations\Annotation::class)) {
1338
1338
thrownewLogicException('Annotations cannot be enabled as the Doctrine Annotation library is not installed.');
1339
1339
}
1340
1340
@@ -1346,7 +1346,7 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
1346
1346
}
1347
1347
1348
1348
if ('none' !== $config['cache']) {
1349
-
if (!class_exists('Doctrine\Common\Cache\CacheProvider')) {
1349
+
if (!class_exists(\Doctrine\Common\Cache\CacheProvider::class)) {
1350
1350
thrownewLogicException('Annotations cannot be enabled as the Doctrine Cache library is not installed.');
1351
1351
}
1352
1352
@@ -1452,7 +1452,7 @@ private function registerSecurityCsrfConfiguration(array $config, ContainerBuild
1452
1452
return;
1453
1453
}
1454
1454
1455
-
if (!class_exists('Symfony\Component\Security\Csrf\CsrfToken')) {
1455
+
if (!class_exists(\Symfony\Component\Security\Csrf\CsrfToken::class)) {
1456
1456
thrownewLogicException('CSRF support cannot be enabled as the Security CSRF component is not installed. Try running "composer require symfony/security-csrf".');
1457
1457
}
1458
1458
@@ -1563,7 +1563,7 @@ private function registerPropertyInfoConfiguration(ContainerBuilder $container,
1563
1563
1564
1564
$loader->load('property_info.xml');
1565
1565
1566
-
if (interface_exists('phpDocumentor\Reflection\DocBlockFactoryInterface')) {
1566
+
if (interface_exists(\phpDocumentor\Reflection\DocBlockFactoryInterface::class)) {
0 commit comments