Skip to content

[TypeDeclarationDocblocks] Keep native @param/@var/@return description on MergePhpstanDocTagIntoNativeRector - #8781

Merged
TomasVotruba merged 1 commit into
mainfrom
keep-native-des
Oct 23, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
keep-native-des

Conversation

@samsonasik

@samsonasik samsonasik commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Fixes rectorphp/rector#9938

Do not remove existing description.

@samsonasik

Copy link
Copy Markdown
Member Author

@TomasVotruba ready 👍

@TomasVotruba
TomasVotruba merged commit 2845e35 into main Oct 23, 2026
49 checks passed
@TomasVotruba
TomasVotruba deleted the keep-native-des branch October 23, 2026 07:22
@TomasVotruba

Copy link
Copy Markdown
Member

Looks great

Comment on lines +40 to +41
* @param string|list<string|null>|null $excludePattern Optional regex; classes matching this are excluded
* from the layer even when $pattern matches.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I just checked that on phpcs, multilines description on @param will got notice:

Squiz.Commenting.FunctionComment.MissingParamName

I am thinking when the tag is multilines, it should be skipped instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe inline to a single-line comment? It might be hard to indent it exactly as before.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

that's will make another error, eg: more than 120 chars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

MergePhpstanDocTagIntoNativeRector should not remove description

2 participants