From aaff522cadf0d4db71cbd2b13aef6af4fca2a19d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 26 Feb 2016 13:51:15 +0100 Subject: [PATCH 1/2] [FrameworkBundle] Fix PropertyInfo registration when using reflection-docblock 3 --- .../DependencyInjection/FrameworkExtension.php | 2 +- src/Symfony/Bundle/FrameworkBundle/composer.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index c4c65144a52f..7999825db742 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1010,7 +1010,7 @@ private function registerPropertyInfoConfiguration(array $config, ContainerBuild $loader->load('property_info.xml'); - if (class_exists('phpDocumentor\Reflection\ClassReflector')) { + if (class_exists('phpDocumentor\Reflection\Types\ContextFactory')) { $definition = $container->register('property_info.php_doc_extractor', 'Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor'); $definition->addTag('property_info.description_extractor', array('priority' => -1000)); $definition->addTag('property_info.type_extractor', array('priority' => -1001)); diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index b81e6f105b8f..92eb6d81c626 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -50,7 +50,10 @@ "symfony/validator": "~2.8|~3.0", "symfony/yaml": "~2.8|~3.0", "symfony/property-info": "~2.8|~3.0", - "phpdocumentor/reflection": "^1.0.7" + "phpdocumentor/reflection-docblock": "^3.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0" }, "suggest": { "symfony/console": "For using the console commands", From 6eb24302060f1ee27074fb0592e1d9b1ce40dbdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 28 Feb 2016 20:28:02 +0100 Subject: [PATCH 2/2] Check for DocBlockFactoryInterface --- .../FrameworkBundle/DependencyInjection/FrameworkExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 7999825db742..cd79df3eb2a2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1010,7 +1010,7 @@ private function registerPropertyInfoConfiguration(array $config, ContainerBuild $loader->load('property_info.xml'); - if (class_exists('phpDocumentor\Reflection\Types\ContextFactory')) { + if (class_exists('phpDocumentor\Reflection\DocBlockFactoryInterface')) { $definition = $container->register('property_info.php_doc_extractor', 'Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor'); $definition->addTag('property_info.description_extractor', array('priority' => -1000)); $definition->addTag('property_info.type_extractor', array('priority' => -1001));