-
Notifications
You must be signed in to change notification settings - Fork 51
Move to PHP-CS-Fixer #13
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
Conversation
@Majkl578 I saw your 👎 and I would like to hear your reasoning. What it really bugs me about PHP_CodeSniffer is how hard it is to understand what a sniffers does. Let's take an example: in the <!-- Require EOL at EOF -->
<rule ref="Generic.Files.EndFileNewline"/> As a (wannabe) contributor I want to understand what this sniffer does.
And all this for such a simple sniffer. On the opposite, if you look for what
|
IMO also 👎 on moving to different tooling (and moving back again after a few months, ping-pong style). The D2 folks are familiar with PHPCS, which is quite OK and well maintained anyway. Also, the Slevomat coding standard is more than 50% of the reasons to stay with PHPCS. |
PHPCS is a good tool, not a perfect one, but we already did all the work here, so let's settle it this way for now, and we can decide to re-open the topic if it pops up again in a few months. |
Agree with @Ocramius on this. The reasons outlined don't convince me to use php-cs-fixer. As for helping contributors, if a pull request fails with CS errors, we're happy to help them if the error can't be fixed automatically. |
As mentioned in #9 (comment) I'm ok with this
All the Symfony users are familiar to PHP-CS-Fixer, which is a large user base too.
Ok
I don't get money for PHP-CS-Fixer, and I agree that changing the tools is expensive.
As long as you like that activity, good for you. |
I was on a phone. 😉
No added value in having it in PHP, you are still using plain strings (unlike i.e. classnames, there it'd be useful).
Some of the PHPCS classes as well, some not. But this isn't really issue on our end, documentation should be discussed on PHPCS repo (squizlabs/PHP_CodeSniffer#1752)..
So can easily be PHPCS tests, see https://github.com/slevomat/coding-standard/tree/master/tests/Sniffs.
A wannabe contributor won't read through the ruleset.xml, but read i.e. CONTRIBUTING.md, or nothing. Now significant sniffs are also described in README in this repo. Most of the other generic sniffs are simply checks for bad habits / typos etc., like
That's fine, there is no need to know such information before you actually need it. And when you do, you're indicated which error is automatically fixable and which not. I have no strong opinion about PHP-CS-Fixer, I just have no experience with it. Though I admit, recent PHP-CS-Fixer spam/ad in PRs across GH did slightly irritate me (do they giveaway free hats for 5 PR or so?). |
ruleset.xml
toConfig.php
(I'll do this after the topic discussion)README.md
Hi, following #9 (comment) here I propose to drop PHP_CodeSniffer in favour of PHP-CS-Fixer with the following reasons:
@PHPUnit60Migration:risky
@DoctrineAnnotation