Skip to content
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

[CS] Apply SlevomatCodingStandard.Commenting.AnnotationName rule #6015

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

phansys
Copy link
Contributor

@phansys phansys commented Apr 17, 2023

Q A
Type improvement
Fixed issues n/a

Summary

Normalize the usage for the @inheritdoc tag.

ToDo

  • Check if these changes can be covered by PHPCS.

@derrabus
Copy link
Member

This looks like something PHPCS should do.

@phansys
Copy link
Contributor Author

phansys commented Apr 17, 2023

I agree, but I don't know if PHPCS has a specific rule for this or if the FunctionCommentSniff rule should be enough in this case.

@phansys phansys marked this pull request as ready for review April 17, 2023 09:58
@greg0ire
Copy link
Member

Can you please open an issue about this on https://github.com/slevomat/coding-standard ?

Copy link
Member

@derrabus derrabus left a comment

Choose a reason for hiding this comment

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

Unless we can have this fixed by PHPCS, I'd like to keep everything as inconsistent as it is.

@phansys phansys marked this pull request as draft April 17, 2023 14:12
@phansys
Copy link
Contributor Author

phansys commented Apr 17, 2023

@greg0ire
Copy link
Member

I believe both are correct and mean the same thing, but I might be wrong. The sniff that detects such comments that are useless should absolutely detect both. The helper should also detect both.
If they both mean the same thing, then it's a matter of style, and a rule to pick one style over the other is 100% the job of a coding standard.

@phansys
Copy link
Contributor Author

phansys commented Apr 21, 2023

Unless we can have this fixed by PHPCS, I'd like to keep everything as inconsistent as it is.

@derrabus: doctrine/coding-standard#311.

@phansys phansys force-pushed the inheritdoc branch 2 times, most recently from d0fecc5 to 2f352cd Compare April 24, 2023 18:43
composer.json Outdated
@@ -40,7 +40,7 @@
"psr/log": "^1|^2|^3"
},
"require-dev": {
"doctrine/coding-standard": "11.1.0",
"doctrine/coding-standard": "12.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW, if we are releasing new CS rules from "doctrine/coding-standard" only in major versions, couldn't we use ^12.0 here?

Copy link
Member

Choose a reason for hiding this comment

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

You're right, we probably should… not sure why we are pinning this one.

@phansys phansys marked this pull request as ready for review April 24, 2023 19:20
@greg0ire greg0ire changed the title Replace @inheritDoc tags with @inheritdoc Replace @inheritdoc tags with @inheritDoc Apr 24, 2023
@phansys phansys changed the title Replace @inheritdoc tags with @inheritDoc [CS] Apply SlevomatCodingStandard.Commenting.AnnotationName rule Apr 24, 2023
@derrabus derrabus added this to the 3.7.0 milestone Apr 24, 2023
@derrabus derrabus merged commit 81579c2 into doctrine:3.7.x Apr 24, 2023
72 checks passed
@phansys phansys deleted the inheritdoc branch April 24, 2023 21:22
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants