Skip to content

Commit 9f07ea8

Browse files
committed
[Config][FrameworkBundle] Hint to use PHP 8+ or to install Annotations to use attributes/annots
1 parent 8889da1 commit 9f07ea8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
13121312

13131313
if (\array_key_exists('enable_annotations', $config) && $config['enable_annotations']) {
13141314
if (!$this->annotationsConfigEnabled && \PHP_VERSION_ID < 80000) {
1315-
throw new \LogicException('"enable_annotations" on the validator cannot be set as Doctrine Annotations support is disabled.');
1315+
throw new \LogicException('"enable_annotations" on the validator cannot be set as the PHP version is lower than 8 and Doctrine Annotations support is disabled. Consider upgrading PHP.');
13161316
}
13171317

13181318
$validatorBuilder->addMethodCall('enableAnnotationMapping', [true]);
@@ -1576,7 +1576,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
15761576
$serializerLoaders = [];
15771577
if (isset($config['enable_annotations']) && $config['enable_annotations']) {
15781578
if (\PHP_VERSION_ID < 80000 && !$this->annotationsConfigEnabled) {
1579-
throw new \LogicException('"enable_annotations" on the serializer cannot be set as Annotations support is disabled.');
1579+
throw new \LogicException('"enable_annotations" on the serializer cannot be set as the PHP version is lower than 8 and Annotations support is disabled. Consider upgrading PHP.');
15801580
}
15811581

15821582
$annotationLoader = new Definition(

0 commit comments

Comments
 (0)