Normalize PHP CS to enforce PSR-2 standard and normalized indentation, part 1#6847
Normalize PHP CS to enforce PSR-2 standard and normalized indentation, part 1#6847mvorisek wants to merge 2 commits intophp:masterfrom
Conversation
|
I'm not a fan of this, we have been using the PEAR coding standards for |
nikic
left a comment
There was a problem hiding this comment.
Hard reject for any CI enforced coding style from my side.
Can you please elaborate what are the cons you see? |
|
IMHO this brings no value and there is no reason to purify code in tests. |
|
Citing from PSR-12 spec why enforcing CS:
|
|
These changes would do more harm than good, due to inevitable merge conflicts. |
As the tests are rarely changed in previous release branches, I think this is not an issue for php-src :) In long term, this is reduce the conflicts. |
|
This is just entirely unnecessary. As already mentioned, it provides no meaningful value. The code in this repository doesn't constitute a library, or a project, or code you have to interoperate with: None of the things that call us to have coding standards in our PHP projects apply to the code here. Forcing the application of a standard just makes it less likely that people will bother to contribute. |
|
There are things I would fix on one by one basis, but I wouldn't want to enforce a standard in PHP tests. For example, I am annoyed by parentheses around require/include and I remove them whenever I am modifying a test case, or unnecessary indentation of PHP code. This makes the code look better and also contributes to proper code highlighting in my IDE, but enforcing this across all test cases is not wise. |
|
@kamil-tekiela my PR is to fix whitespaces first and some basic things like Can you elaborate what you mean by one by one basis vs. not enforcing the rules globally? Once we fix something, we want that to be enforced, right? |
|
All I meant is that I wouldn't do it for all the files just to enforce a standard. If you find yourself changing an existing test file for some other reason, then take some time to fix the formatting to make it easier to read. |
Part 1, apply on
ext/bcmathdirectory and scripts.Another parts will update more
ext/*files.Please advise which directories contains files intended to have obscure formating to test PHP lexer.