laravel / pint

Laravel Pint is an opinionated PHP code style fixer for minimalists.

Home Page:https://laravel.com/docs/pint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Choose once for all which rules to include

laserhybiz opened this issue · comments

I'm using the default laravel preset for multiple projects and almost every time I run composer update for minor releases there are new rules to the preset which in turn makes changes to some files.

I wouldn't call this a breaking change (although it can be - in risky rules e.g. ordered_traits ) but its extremely annoying. I suggest the team sit down and discuss each available rule whether/how it should be implemented into the preset.

You can lock pint to specific version if you want to avoid this, and only bump version every few months.

@crynobone almost every PR is just adding a rule, why not decide once for all which rules to add?

@lazer-hybiz this is exactly the point of this repo. That whenever you update the package you are adopting the current rule set of Laravel. Keeping your code up to date with what we enforce is what this package was intended for. If that’s annoying for you then maybe Pint isn’t for you, sorry.

@driesvints but why not set the rule set of Laravel once for all? why do we need every week a new PR to add a rule?

Because opinions change over time or PHP CS Fixer might come out with rules that'll help us fix styling to our own preferences more.