logo

A valid reason to override coding standards locally

A follow up to a previous tip

Joel Clermont
Joel Clermont
2025-10-21

Recently, I had a video about PHP CS Fixer's ability to override coding standards locally, and how the docs even encourage having a local config file which is untracked to let you do this.

I couldn't understand why you want to do this, since it seems to defeat the purpose of having a shared coding standard in the first place.

The creator of PHP CS Fixer had a great explanation I wasn't considering.

There are other things you can adjust in these files besides the actual coding standards: the path to your PHP executable, cache location, how progress bars are shown, to name a few.

Some of those things you might standardize as a team by using Docker, but some could just be personal developer preference.

He also agreed it would not be a good idea to override actual rulesets and coding standards this way. So my original point stands, with this additional nuance that there are a few settings that could make sense to override locally.

Here to help,

Joel

P.S. If your project doesn't yet have a coding standard, I can help you get that set up quickly so you can enjoy a cleaner codebase. Just get in touch.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼
email
No spam. Only real-world advice you can use.