Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FrameworkBundle] Fix PropertyInfo registration when using reflection-docblock 3 #17931

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -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')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also check for existence of the phpDocumentor\Reflection\DocBlockFactoryInterface.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

$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));
Expand Down
5 changes: 4 additions & 1 deletion src/Symfony/Bundle/FrameworkBundle/composer.json
Expand Up @@ -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",
Expand Down