-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
DX: new config filename #5607
DX: new config filename #5607
Conversation
I propose |
|
But Example of universal & easily understandable
|
Do we actually need to support having a "dist" file though? I never saw a valid use case and still fail to imagine one. |
That is the case. We should be simple filename (without See my suggestion: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5609/files#r609648455 |
Please elaborate :) |
see above, |
I know it allows local override, but why is that needed? The point of this tool is to enforce consistent code style between multiple code contributors. When would one need to diverge from that locally (i.e. apply a different code style)? |
I belive to support one DEFAULT local/prioritized name, ie. one name that does not have to be specified explicitly to override the config. |
@julienfalque , i know you are not in favour of multiple config files approach ;) what is |
@mvorisek Use of @julienfalque My typical use case for local and |
I would be happy to do so witch CS Fixer taking the lead :) |
af8b677
to
25d4306
Compare
1dd9a5f
to
c704d13
Compare
https://issues.apache.org/jira/browse/NETBEANS-5577 Added configuration files `.php-cs-fixer.php` and `.php-cs-fixer.dist.php` to Important files. Reference: - https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/3.0/UPGRADE-v3.md - PHP-CS-Fixer/PHP-CS-Fixer#5607
Fix deprecation warning by renaming the config file: ``` 15.95 > php-cs-fixer fix --diff --verbose '--dry-run' 16.10 You are running PHP CS Fixer v2, which is not maintained anymore. Please update to v3. 16.10 You may find an UPGRADE guide at https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.3.0/UPGRADE-v3.md . 16.10 If you need help while solving warnings, ask at https://gitter.im/PHP-CS-Fixer, we will help you! 16.10 16.10 PHP CS Fixer 2.19.3 Testament by Fabien Potencier and Dariusz Ruminski 16.10 Runtime: PHP 7.4.30 16.10 Loaded config default from "/opt/composer/v1/.php_cs". 16.14 ...... 16.26 Legend: ?-unknown, I-invalid file syntax (file ignored), S-skipped (cached or empty file), .-no changes, F-fixed, E-error 16.26 16.26 Checked all files in 0.134 seconds, 14.000 MB memory used 16.26 16.26 Detected deprecations in use: 16.26 - Configuration file `.php_cs` is deprecated, rename to `.php-cs-fixer.php`. ``` From https://github.com/dependabot/dependabot-core/actions/runs/3040792095/jobs/4897247001#step:6:6736 The warning suggests to rename to `php-cs-fixer.php`. However, looking at https://github.com/keradus/PHP-CS-Fixer/blob/master/UPGRADE-v3.md I see that is the recommended file name for the _local development_ config file. The distributed one should be `.php-cs-fixer.dist.php`, so I used that instead. More details on the distinction between the two types of files here: PHP-CS-Fixer/PHP-CS-Fixer#5607
old files are still allowed. will be disallowed with upgrade msg in #5609