-
Notifications
You must be signed in to change notification settings - Fork 75
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
add php cs fixer #112
base: master
Are you sure you want to change the base?
add php cs fixer #112
Conversation
4f02565
to
d7fe67d
Compare
* | ||
* @see Doctrine_Core::FETCH_* constants | ||
* @param integer $fetchStyle Controls how the next row will be returned to the caller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is weird: are those parameters not used or sub-implementations are defining them?
Another option is: should this class implement the interface below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d7fe67d
to
f51e99c
Compare
12797b5
to
2e5a8ee
Compare
kudos to mlocati and his magnificent tool: https://mlocati.github.io/php-cs-fixer-configurator/ |
I will rollback the migration commits, but i had some time to play with the rules. |
894a864
to
7b68440
Compare
7b68440
to
0809ad0
Compare
0809ad0
to
85f594a
Compare
5e52cbd
to
ec9f90e
Compare
I did this PR, but now I'm thinking that it's actually the code base doctrine, so it would be closer to the doctrine-current project if we use the doctrine specific PHP_CodeSniffer here: https://github.com/doctrine/coding-standard |
I would keep this PR for the following reasons:
WDYT @connorhu ? |
In some cases, the cs-fixer will break the original formatting (which is what the current doctrine uses) rather than improve it. For example, the equals sign in the value of variables has been indented since the beginning. This is how they do it now, and this formatting is not done by cs-fixer as far as I know. The more I see of cs-fixer, the more I think that using cs-fixer in the symfony1 project was a bad choice. For example, the developers of cs-fixer just want to fix the code, they do not want to serve reporting purposes. That's why the annotation location is buggy. CodeSniffer by design solves this and it works fine. The current-symfony sweeps this problem under the rug instead and is one of the reasons why fabbot.io exists.
I see no problem with turning off all problematic rule and turning them back on one by one. The same should be done with the psalm, I'm not short of tasks there either. I did the port of the symfony1 test system to phpunit, that was no small job. (Btw there are a few bugs I fixed and haven't put in the patch yet.) |
This is an example of how codesniffer works well. By the way, I don't agree with all doctrine style rules (not even the one I took the picture of, I've written |
@thePanz @thirsch Seeing how much misunderstanding php-cs-fixer causes, I don't see it as suitable for CI/QA purposes for the time being. How about we drop cs-fixer here now, introduce php-codesniffer and when it is suitable for quality reporting we will switch to cs-fixer. Having heard @thirsch's comment on swiftmailer the other day, I also recommend the code sniffer for less change noise. |
No description provided.