-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Upgrade PHP CS Fixer to v2 + re-apply #8823
Conversation
|
7d4cc41
to
fc41be6
Compare
+1. |
LOOOL :) You made my day if not month. I was the one who introduced So, let me share some insight on Magento 2 codebase current state of things and what I was planning to do after #8685 (where First of all, I noticed that without my attention Here is a realistic plan of how the things could be done within Magento 2 circumstances. I'm open for discussion and can provide rationale for every item by request as I could share not enough insight and/or overlooked something.
@keradus, I do not expect you willing to participate in anything but 6. which you already implemented, just want to get maximum from your efforts :) Full list is in a greater degree for Magento guys to comprehend the whole picture and assess how it aligns with Magento plans. |
Hi @orlangur , thank you for your response !
My main purpose was to upgrade PHP CS Fixer from v1 to v2, as v1 is no longer maintened.
It's not a war. Variety is good. Using any SCA tool is good. not sure if there is a need for using PHP Coding Standards Fixer and PHP Code Sniffer at the same time makes sense, if there are issues on applying any of them in the end... Short suggestions - if possible, try to adopt existing rules (of any SCA tools), adjusting them if needed, but avoid writing custom rules. A lot of time and issue with maintainig it after some time. Also, well established rules are easier to follow by ppl. ad 0. I was not aware of #8685, I think it makes this, mine PR obsolete and ready to close (still, I would leave #8822 as example how to update). Would you agree? ad 4. speed is relative. ad 5. I thought it's already in ad 7. I thought that StaticReview is dead. Try https://github.com/phpro/grumphp ad 10. Funny part here - we don't make new rules and apply them on repo. We take existing rules (that are written down or already present in 95% of code) and then write rules for them ;) At any steps related to PHP CS Fixer feel free to ping me for any help, assistance or just a review. |
Yeah, absolutely. I'm going to review it.
The war against bad looking or bad smelling code I mean ;)
The main motivation for
Actually I intentionally applied just a couple of
In worst case it will be the same time anyway, I don't trust the delta mechanism after #8612 but concrete decision could be made in scope of
What I was trying to say is to revise existing ruleset before re-apply (to avoid double re-apply) and enable all possible useful fixers :) #8822 without changing list of used fixers is totally fine.
Thanks, didn't hear of it before, if it allows to apply
Aha, I see :) For me it's usually an opposite process: I see something I don't like or something I really like in another project and then apply it to my project with automated tests enforcement to eliminate any discussions. |
Thanks for answer. |
vide #8822