|
61 | 61 | use Symfony\Component\PropertyAccess\PropertyAccessor; |
62 | 62 | use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; |
63 | 63 | use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; |
| 64 | +use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; |
64 | 65 | use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; |
65 | 66 | use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; |
66 | 67 | use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader; |
@@ -296,7 +297,7 @@ public function load(array $configs, ContainerBuilder $container) |
296 | 297 | } |
297 | 298 |
|
298 | 299 | if ($this->isConfigEnabled($container, $config['property_info'])) { |
299 | | - $this->registerPropertyInfoConfiguration($config['property_info'], $container, $loader); |
| 300 | + $this->registerPropertyInfoConfiguration($container, $loader); |
300 | 301 | } |
301 | 302 |
|
302 | 303 | if ($this->isConfigEnabled($container, $config['lock'])) { |
@@ -1543,8 +1544,12 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder |
1543 | 1544 | } |
1544 | 1545 | } |
1545 | 1546 |
|
1546 | | - private function registerPropertyInfoConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) |
| 1547 | + private function registerPropertyInfoConfiguration(ContainerBuilder $container, XmlFileLoader $loader) |
1547 | 1548 | { |
| 1549 | + if (!interface_exists(PropertyInfoExtractorInterface::class)) { |
| 1550 | + throw new LogicException('PropertyInfo support cannot be enabled as the PropertyInfo component is not installed. Try running "composer require symfony/property-info".'); |
| 1551 | + } |
| 1552 | + |
1548 | 1553 | $loader->load('property_info.xml'); |
1549 | 1554 |
|
1550 | 1555 | $container->getDefinition('property_info')->setPrivate(true); |
|
0 commit comments