Skip to content

Commit

Permalink
Rename .php_cs -> .php-cs-fixer.dist.php
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jeffwidman committed Sep 12, 2022
1 parent 6e78381 commit 2668005
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer/.gitignore
Expand Up @@ -3,5 +3,5 @@
/tmp
/dependabot-*.gem
/helpers/vendor/
.php_cs.cache
.php-cs-fixer.cache
Gemfile.lock
File renamed without changes.
2 changes: 1 addition & 1 deletion composer/helpers/v1/build
Expand Up @@ -14,7 +14,7 @@ helpers_dir="$(dirname "${BASH_SOURCE[0]}")"
cp -r \
"$helpers_dir/bin" \
"$helpers_dir/src" \
"$helpers_dir/.php_cs" \
"$helpers_dir/.php-cs-fixer.dist.php" \
"$helpers_dir/composer.json" \
"$helpers_dir/composer.lock" \
"$helpers_dir/phpstan.neon" \
Expand Down

0 comments on commit 2668005

Please sign in to comment.