Skip to content

[CS] Apply phpdoc_annotation_without_dot #24149

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

Closed

Conversation

keradus
Copy link
Member

@keradus keradus commented Sep 11, 2017

Q A
Branch? 2.7
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? n/a
Fixed tickets n/a
License MIT
Doc PR n/a

Rule was manually applied here : #19198
In same PR, fixer for this rule was requested, later implementation was approved by Symfony in PHP-CS-Fixer/PHP-CS-Fixer#2020 .

Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word.
If there are multiple sentences, it doesn't make any changes.

Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.
Let us fix grammar by finishing applying the rule.

If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from @Symfony ruleset.

Info: I did manually reviewed every single change of this PR.

@@ -4,7 +4,7 @@

/**
* @deprecated but this is a test
* deprecation notice.
* deprecation notice
Copy link
Member

Choose a reason for hiding this comment

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

corresponding assertion needs to be updated

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks

@chalasr
Copy link
Member

chalasr commented Sep 11, 2017

Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.

Can we fix them (or avoid lcfirst already updated ones)?

@fabpot
Copy link
Member

fabpot commented Sep 11, 2017

Thank you @keradus.

fabpot added a commit that referenced this pull request Sep 11, 2017
This PR was squashed before being merged into the 2.7 branch (closes #24149).

Discussion
----------

[CS] Apply phpdoc_annotation_without_dot

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Rule was manually applied here : #19198
In same PR, fixer for this rule was requested, later implementation was approved by Symfony in PHP-CS-Fixer/PHP-CS-Fixer#2020 .

Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word.
If there are multiple sentences, it doesn't make any changes.

Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.
Let us fix grammar by finishing applying the rule.

If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from `@Symfony` ruleset.

Info: I did manually reviewed every single change of this PR.

Commits
-------

7a97b49 [CS] Apply phpdoc_annotation_without_dot
@fabpot fabpot closed this Sep 11, 2017
@fabpot
Copy link
Member

fabpot commented Sep 11, 2017

I've just merged 2.7 up to master. I will now re-execute the fixer on each branch to fix all violations introduced since 2.7.

@keradus
Copy link
Member Author

keradus commented Sep 11, 2017

Status quo is (...).

Can we fix them (...) ?

this PR does, at least for 2.7 line

@keradus
Copy link
Member Author

keradus commented Sep 11, 2017

thanks @fabpot 👍

@keradus keradus deleted the 2.7_--rules=phpdoc_annotation_without_dot branch September 11, 2017 21:05
xabbuh added a commit that referenced this pull request Sep 12, 2017
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] fix test assertion

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Fixes tests for #23816 after the changes made in #24149.

Commits
-------

75a26bb [Debug] fix test assertion
@chalasr
Copy link
Member

chalasr commented Sep 12, 2017

@keradus What I mean is that we now have some annotations with first letter uppercased in the middle of a block, that feels inconsistent. IMHO that should be two different rules, or the rule should be named phpdoc_annotation_no_sentence and cover both. Right now php-cs-fixer checks against the dot but acts on both dot and first letter.

@keradus
Copy link
Member Author

keradus commented Sep 12, 2017

name is misleading indeed, yet full rule description is mentioning that.
If you want, please open a PR to fix naming 👍

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

Successfully merging this pull request may close these issues.

4 participants