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

Update the default migration template to adhere to PSR 12 formatting #875

Merged
merged 2 commits into from
Apr 19, 2021

Conversation

natewiebe13
Copy link
Contributor

@natewiebe13 natewiebe13 commented Nov 27, 2019

Q A
Type improvement
BC Break no
Fixed issues #1119

Summary

This change updates the generated migration file to follow the PSR-12 standard. To pull the exact phrasing:

When you have a return type declaration present, there MUST be one space after the colon followed by the type declaration. The colon and declaration MUST be on the same line as the argument list closing parenthesis with no spaces between the two characters.

This will help keep formatting consistent between the migrations and the application and removes the need to reformat the migration file after it's created.

@lcobucci
Copy link
Member

This is following doctrine CS. We have been discussing to merge some things of psr12 there. It is better to wait until we have CS v7 to update things IMHO.

@alcaeus
Copy link
Member

alcaeus commented Nov 28, 2019

I agree. Migrating to PSR-12 is on the menu for doctrine/coding-standard. Let’s wait until that’s done 👍

@greg0ire greg0ire changed the base branch from master to 3.1.x November 24, 2020 18:23
@guilliamxavier
Copy link
Contributor

The Doctrine CS was updated a while ago, see #1119 (comment), so this PR should be fine now

@natewiebe13 natewiebe13 force-pushed the psr-12-migrations-template branch from ffbb0e9 to d9f2326 Compare April 19, 2021 18:02
@natewiebe13
Copy link
Contributor Author

Updated PR with changes to docs.

@greg0ire greg0ire merged commit 96c64fa into doctrine:3.1.x Apr 19, 2021
@greg0ire greg0ire added this to the 3.1.2 milestone Apr 19, 2021
@natewiebe13 natewiebe13 deleted the psr-12-migrations-template branch April 19, 2021 21:28
@greg0ire greg0ire linked an issue Apr 19, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto generated migration doesnt valid for PSR12
6 participants