phpDocumentor / ReflectionDocBlock

MIT License
9.34k stars 117 forks source link

Bugfix: resolve issue with multiline descriptions #367

Closed jaapio closed 4 months ago

jaapio commented 4 months ago

The phpstan parser is not consuming the full description when parsing docblocks with a more complex description. For them it's mostlikely not an issue as phpstan doesn't use the descriptions. But it will also parse the descriptions into unexpected tags. This could be an advantage but is not according to the phpdoc spec.

Our own tokenizer is already tokenizing the docblocks into the correct parts. So all we needed to do is assume all remaining tokens in the phpstan ast belong to the description. From there our own code is able to handle this as before in v5.3.

fixes #365