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
"no-return" phpdoc not removed because superflous #7914
Comments
-1 for removing the phpstan/psalm's alias types. +0 for renaming them to proper php-like |
Why? These are equivalents of |
in my proposal they ultimately would. just with 2 atomic rules, and one can decide what they want. if they want "all", they enable both rules. I do not want to clutter rule operating on proper types with "historical types", and i want explicit rule to clean up "historical types" |
OK, now it's more clear how you see it, it totally wasn't clear from the first comment. I am not sure if I agree with this approach, though. Personally I would do this in the same fixer, maybe behind opt-in flag. |
I think I prefer a dedicated rule for replacing e.g. |
If it was general purpose fixer for unifying phpDoc, then OK. Making a rule just for |
I think it makes sense to cover more aliases. |
phpstan and psalm support
|
If there are not any more examples of annotations that could be standardised (alias → basic name), then I don't see a point in investing time in this, as it can be easily achieved with regex-based replace using Then it can be removed by |
Bug report
Description
cs-fixer is removing a
@return never
phpdoc above a method, as soon as a:never
native type is added.it is not removing a
@return no-return
phpdoc though, which is a alias of@return never
in at least PHPStan and psalm.(there are even more "aliases", see above links)
put
test.php
into the php-cs-fixer repo root:expected result
actual result
Runtime version
Used command
php php-cs-fixer fix test.php
within PHP-CS-Fixer repo rootConfiguration file
PHP-CS-Fixer repo default config
Code snippet that reproduces the problem
see above
The text was updated successfully, but these errors were encountered: