Skip to content

Commit 3a0f2ec

Browse files
committed
Merge branch '3.4' into 4.1
* 3.4: [Finder] fixed root directory access for ftp/sftp wrapper [FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed
2 parents 97fc7cf + 3736bf6 commit 3a0f2ec

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
use Symfony\Component\PropertyAccess\PropertyAccessor;
7070
use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface;
7171
use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface;
72+
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
7273
use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
7374
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
7475
use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader;
@@ -263,7 +264,7 @@ public function load(array $configs, ContainerBuilder $container)
263264
}
264265

265266
if ($this->isConfigEnabled($container, $config['property_info'])) {
266-
$this->registerPropertyInfoConfiguration($config['property_info'], $container, $loader);
267+
$this->registerPropertyInfoConfiguration($container, $loader);
267268
}
268269

269270
if ($this->isConfigEnabled($container, $config['lock'])) {
@@ -1352,8 +1353,12 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
13521353
}
13531354
}
13541355

1355-
private function registerPropertyInfoConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader)
1356+
private function registerPropertyInfoConfiguration(ContainerBuilder $container, XmlFileLoader $loader)
13561357
{
1358+
if (!interface_exists(PropertyInfoExtractorInterface::class)) {
1359+
throw new LogicException('PropertyInfo support cannot be enabled as the PropertyInfo component is not installed. Try running "composer require symfony/property-info".');
1360+
}
1361+
13571362
$loader->load('property_info.xml');
13581363

13591364
if (interface_exists('phpDocumentor\Reflection\DocBlockFactoryInterface')) {

0 commit comments

Comments
 (0)