Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[CS] Enforces null type hint on last position in phpDocs#28675

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:2.8fromcarusogabriel:null-type-hint
Oct 2, 2018
Merged

[CS] Enforces null type hint on last position in phpDocs#28675

nicolas-grekas merged 1 commit intosymfony:2.8fromcarusogabriel:null-type-hint
Oct 2, 2018

Conversation

@carusogabriel
Copy link
Contributor

QA
Branch?2.8
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

As a majority in our codebase, thenull typehint usually comes in the last position in phpDocs.

Copy link
Contributor

@ro0NLro0NL left a comment
edited
Loading

Choose a reason for hiding this comment

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

can/does php-cs-fixer cover it?

Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

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

Maybe this is rejected because of the "merge conflicts" ... but I wish this is merged because it's great for consistency. Thanks Gabriel.

@nicolas-grekasnicolas-grekas added this to the2.8 milestoneOct 2, 2018
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

(would be great to have php-cs-fixer do it for us)

@nicolas-grekas
Copy link
Member

Thank you@carusogabriel.

@nicolas-grekasnicolas-grekas merged commitefbba25 intosymfony:2.8Oct 2, 2018
nicolas-grekas added a commit that referenced this pull requestOct 2, 2018
… (carusogabriel)This PR was merged into the 2.8 branch.Discussion----------[CS] Enforces null type hint on last position in phpDocs| Q             | A| ------------- | ---| Branch?       | 2.8| Bug fix?      | no| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets | -   <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | - <!-- required for new features -->As a majority in our codebase, the `null` typehint usually comes in the last position in phpDocs.Commits-------efbba25 [CS] Enforces null type hint on last position in phpDocs
@carusogabrielcarusogabriel deleted the null-type-hint branchOctober 2, 2018 12:08
@TomasVotruba
Copy link
Contributor

@ro0NL No need to.NullTypeHintOnLastPositionSniff can

services:SlevomatCodingStandard\Sniffs\TypeHints\NullTypeHintOnLastPositionSniff:~
vendor/bin/ecs check src/Symfony --fix

@jvasseur
Copy link
Contributor

php-cs-fixer can do it with thephpdoc_types_order fixer.

carusogabriel reacted with thumbs up emoji

@carusogabriel
Copy link
ContributorAuthor

@jvasseur Thanks for that. Gonna open a PR adding that to all current active branches.

TomasVotruba reacted with thumbs up emoji

fabpot added a commit that referenced this pull requestOct 11, 2018
This PR was merged into the 2.8 branch.Discussion----------[CS] Enable phpdoc_types_order| Q             | A| ------------- | ---| Branch?       | 2.8| Bug fix?      | no| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets | -   <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | -As suggested by@jvasseur in#28675 (comment), we can use the `phpdoc_types_order` rule from PHP-CS-Fixer to ensure that `null` is always on the last position in phpDocs as proposed in#28675.Commits-------c340502 [CS] Enable phpdoc_types_order
SpacePossum added a commit to PHP-CS-Fixer/PHP-CS-Fixer that referenced this pull requestOct 18, 2018
…abriel)This PR was merged into the 2.14-dev branch.Discussion----------Add phpdoc_types_order rule to Symfony's rulesetAs suggested by@julienfalque insymfony/symfony#28780, besides add this new rule due tosymfony/symfony#28675, we should also enforces it in Symfony's ruleset here too 😊Commits-------c2ccec2 Add phpdoc_types_order rule to Symfony's ruleset
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@ro0NLro0NLro0NL approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.8

Development

Successfully merging this pull request may close these issues.

7 participants

@carusogabriel@nicolas-grekas@TomasVotruba@jvasseur@javiereguiluz@ro0NL@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp