-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feature: NoSuperfluousPhpdocTagsFixer - support untyped and empty annotations in phpdoc #5792
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
feature: NoSuperfluousPhpdocTagsFixer - support untyped and empty annotations in phpdoc #5792
Conversation
I would count it as enhancement and not as a bug, to be honest. it's not that fixer was doing wrong changes, it's simply that now it learned new tricks |
please rebase and solve issues detected by CI |
9e675a9
to
53b0392
Compare
I would advocate this to be a bugfix, the description of the fixer is "Removes For me exactly the same reasoning as this being bugfix (don't get confused by a label, see the milestone). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this new ability should be controlled via a configuration option, off by default.
@GrahamCampbell
They are conceptually the same. |
The second case is invalid syntax. |
@supersmile2009 Looks good, thank! Please rebase your branche to solve conflicts. IMO this can be merged as an enhancement, so enabled without option. @SpacePossum @keradus @kubawerlos What do you think? |
Hi @julienfalque. Ok, I'll have some spare time this week so I'll rebase it. I'd also like to mention that I understand @GrahamCampbell's reasoning about the cases handled with this PR being technically invalid. However if we think of it from a practical standpoint, the are 2 options how you'd want to handle these cases:
Note that I'm targeting only clearly and reliably identifiable empty phpDoc tags with this PR. Any other invalid or unsupported cases are not affected by this change. |
53b0392
to
6ec0903
Compare
6ec0903
to
ad1a6b8
Compare
Hi @julienfalque.
|
@julienfalque , can you decide what next here? |
Thank you @supersmile2009. |
This PR fixes a bug/unsupported case where
no_superfluous_phpdoc_tags
filter won't remove useless@param
and@var
tags when there's no type and/or when the tag is empty. Examples: