|
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'])) {
|
@@ -1545,8 +1546,12 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
|
1545 | 1546 | }
|
1546 | 1547 | }
|
1547 | 1548 |
|
1548 |
| - private function registerPropertyInfoConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) |
| 1549 | + private function registerPropertyInfoConfiguration(ContainerBuilder $container, XmlFileLoader $loader) |
1549 | 1550 | {
|
| 1551 | + if (!interface_exists(PropertyInfoExtractorInterface::class)) { |
| 1552 | + throw new LogicException('PropertyInfo support cannot be enabled as the PropertyInfo component is not installed. Try running "composer require symfony/property-info".'); |
| 1553 | + } |
| 1554 | + |
1550 | 1555 | $loader->load('property_info.xml');
|
1551 | 1556 |
|
1552 | 1557 | $container->getDefinition('property_info')->setPrivate(true);
|
|
0 commit comments