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

Auto generated migration doesnt valid for PSR12 #1119

Closed
kirya-dev opened this issue Jan 29, 2021 · 6 comments · Fixed by #875
Closed

Auto generated migration doesnt valid for PSR12 #1119

kirya-dev opened this issue Jan 29, 2021 · 6 comments · Fixed by #875

Comments

@kirya-dev
Copy link

Bug Report

Auto generated migration doesnt valid for PSR12

FILE: /*****/migrations/Version20210129094711.php
------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------
 15 | ERROR | [x] There must not be a space before the colon in a return type declaration
 20 | ERROR | [x] There must not be a space before the colon in a return type declaration
 28 | ERROR | [x] There must not be a space before the colon in a return type declaration
------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------

Time: 8.3 secs; Memory: 36MB
@goetas
Copy link
Member

goetas commented Feb 7, 2021

You can provide a custom template, that follows any coding standard you want. See

@kirya-dev
Copy link
Author

You can provide a custom template

No. Target of this PR will change default behavior.

@guilliamxavier
Copy link
Contributor

Related: doctrine/coding-standard#163 and ef842cf

@jtrupina
Copy link

@kirya-dev I also came across this. Any new updates on this issue? Also there is already open PR: #875 related to this issue. Also, @guilliamxavier I don't see that doctrine/coding-standard#163 fixed this particular issue or am I missing something.

@guilliamxavier
Copy link
Contributor

@jtrupina: I didn't say "fixed"; to be clear: doctrine/coding-standard#163 updated the Doctrine CS rule for return type declarations from "1 space before colon" (historical Doctrine style) to "no space before colon" (PSR-12), and later #1102 (more precisely 53a5da0 and ef842cf) upgraded and applied the new CS to this lib (code), but left out the template (string). Thanks for mentioning #875, you're right 🙂 the thing is it was created before doctrine/coding-standard#163 so was put on hold, and seems to have been forgotten afterwards... I'll ping it 😉

@greg0ire
Copy link
Member

I think we can close this, it will be fixed in the next 3.1.x release :)

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 a pull request may close this issue.

5 participants