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
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -197,7 +197,7 @@ public function load(array $configs, ContainerBuilder $container)
197
197
// default in the Form and Validator component). If disabled, an identity
198
198
// translator will be used and everything will still work as expected.
199
199
if ($this->isConfigEnabled($container, $config['translator']) || $this->isConfigEnabled($container, $config['form']) || $this->isConfigEnabled($container, $config['validation'])) {
200
-
if (!class_exists('Symfony\Component\Translation\Translator') && $this->isConfigEnabled($container, $config['translator'])) {
200
+
if (!class_exists(Translator::class) && $this->isConfigEnabled($container, $config['translator'])) {
201
201
thrownewLogicException('Translation support cannot be enabled as the Translation component is not installed. Try running "composer require symfony/translation".');
202
202
}
203
203
@@ -268,14 +268,14 @@ public function load(array $configs, ContainerBuilder $container)
@@ -288,7 +288,7 @@ public function load(array $configs, ContainerBuilder $container)
288
288
}
289
289
290
290
if ($this->isConfigEnabled($container, $config['assets'])) {
291
-
if (!class_exists('Symfony\Component\Asset\Package')) {
291
+
if (!class_exists(\Symfony\Component\Asset\Package::class)) {
292
292
thrownewLogicException('Asset support cannot be enabled as the Asset component is not installed. Try running "composer require symfony/asset".');
293
293
}
294
294
@@ -298,7 +298,7 @@ public function load(array $configs, ContainerBuilder $container)
298
298
if ($this->isConfigEnabled($container, $config['templating'])) {
299
299
@trigger_error('Enabling the Templating component is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', \E_USER_DEPRECATED);
300
300
301
-
if (!class_exists('Symfony\Component\Templating\PhpEngine')) {
301
+
if (!class_exists(\Symfony\Component\Templating\PhpEngine::class)) {
302
302
thrownewLogicException('Templating support cannot be enabled as the Templating component is not installed. Try running "composer require symfony/templating".');
303
303
}
304
304
@@ -351,7 +351,7 @@ public function load(array $configs, ContainerBuilder $container)
if ($this->isConfigEnabled($container, $config['serializer'])) {
354
-
if (!class_exists('Symfony\Component\Serializer\Serializer')) {
354
+
if (!class_exists(\Symfony\Component\Serializer\Serializer::class)) {
355
355
thrownewLogicException('Serializer support cannot be enabled as the Serializer component is not installed. Try running "composer require symfony/serializer-pack".');
356
356
}
357
357
@@ -1170,18 +1170,18 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
1170
1170
$dirs = [];
1171
1171
$transPaths = [];
1172
1172
$nonExistingDirs = [];
1173
-
if (class_exists('Symfony\Component\Validator\Validation')) {
1174
-
$r = new \ReflectionClass('Symfony\Component\Validator\Validation');
1173
+
if (class_exists(\Symfony\Component\Validator\Validation::class)) {
1174
+
$r = new \ReflectionClass(\Symfony\Component\Validator\Validation::class);
@@ -1281,7 +1281,7 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
1281
1281
return;
1282
1282
}
1283
1283
1284
-
if (!class_exists('Symfony\Component\Validator\Validation')) {
1284
+
if (!class_exists(\Symfony\Component\Validator\Validation::class)) {
1285
1285
thrownewLogicException('Validation support cannot be enabled as the Validator component is not installed. Try running "composer require symfony/validator".');
1286
1286
}
1287
1287
@@ -1351,8 +1351,8 @@ private function registerValidatorMapping(ContainerBuilder $container, array $co
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) {
1472
+
if (!class_exists(PropertyAccessor::class)) {
1473
1473
return;
1474
1474
}
1475
1475
@@ -1523,7 +1523,7 @@ private function registerSecurityCsrfConfiguration(array $config, ContainerBuild
1523
1523
return;
1524
1524
}
1525
1525
1526
-
if (!class_exists('Symfony\Component\Security\Csrf\CsrfToken')) {
1526
+
if (!class_exists(\Symfony\Component\Security\Csrf\CsrfToken::class)) {
1527
1527
thrownewLogicException('CSRF support cannot be enabled as the Security CSRF component is not installed. Try running "composer require symfony/security-csrf".');
1528
1528
}
1529
1529
@@ -1554,7 +1554,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
0 commit comments