Skip to content

Comments

Bugfix: resolve issue with multiline descriptions#367

Merged
jaapio merged 1 commit into5.xfrom
fix/description-regression
May 8, 2024
Merged

Bugfix: resolve issue with multiline descriptions#367
jaapio merged 1 commit into5.xfrom
fix/description-regression

Conversation

@jaapio
Copy link
Member

@jaapio jaapio commented May 8, 2024

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

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
@jaapio jaapio merged commit 88a07d2 into 5.x May 8, 2024
@jaapio jaapio deleted the fix/description-regression branch May 8, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release 5.4.0 does not add our phpstan tags

1 participant