8000 [PropertyInfo] Not compatible with phpDocumentor v5 · Issue #36049 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
[PropertyInfo] Not compatible with phpDocumentor v5 #36049
Closed
@ghost

Description

Symfony version(s) affected: v5.0.5 (all?)

Description
Using the property-info component in combination with phpDocumentor v5 (phpdocumentor/reflection-docblock 5.1.0) results in exceptions being thrown when unknown/invald tags are parsed. Looks like in the latest version og phpDocumentor these tags are not skipped, but an instance of InvalidTag is returned.

Error: Call to undefined method phpDocumentor\Reflection\DocBlock\Tags\InvalidTag::getType()

.../vendor/symfony/property-info/Extractor/PhpDocExtractor.php:145

How to reproduce

<?php

include 'vendor/autoload.php';

use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;

class SomeClass {
    /** @var  */
    public $foo;
}

$phpDocExtractor = new PhpDocExtractor();
$phpDocExtractor->getTypes(\SomeClass::class, 'foo');

Possible Solution
Check for the value type of all values returned by $docBlock->getTagsByName($tag)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0