Description
Describe the solution you'd like
I'd like to re-open a discussion that was started in #371.
The reasoning for having this would be that this would allow consistency in terms of the naming of config files across various QA tooling commonly used by PHP projects. For example, PHPUnit, PHPStan, and Psalm all support config file names that conform <tool name>.dist.<file ext>
scheme.
While using --standard=phpcs.dist.xml
is indeed an option, it requires developers to use the flag as they run PHPCS, which is an extra thing they have to remember to do and extra characters they must type. IMO it would be a better developer experience if they did not have to do it.
Overall, I see that this is a very tiny thing that borderlines with some people's OCD (mine 😂) of wanting to have a consistent PHP tool config file naming strategy.
Regarding file precedence - in my understanding phpcs should first look for files that don't have dist
in them as those could be used be developers to override the "default" projects config distributed using dist
files. Next files with dist
should be loaded, the order of each particular type of dist file name doesn't matter as projects very likely will not have various favours of dist and non-dist config files. In other words, if non-dist file is present then use then, if not fall back to dist.
Regarding releasing it as part of 4.0 - why do you think this addition should be considered a BC breaking change?
- I have read the Contribution Guidelines and this is not a support question.
- I intend to create a pull request to implement this feature.