[PHP-WEBMASTER] [web-php] master: PHP CS Fixer: update usage (#1705)

Author: Dariusz Rumiński (keradus)
Committer: GitHub (web-flow)
Pusher: DanielEScherzer
Date: 2026-07-28T12:12:20-07:00

Commit: PHP CS Fixer: update usage (#1705) · php/web-php@dabc588 · GitHub
Raw diff: https://github.com/php/web-php/commit/dabc5886b9b246bddb4ad846a50d611cb933f4f7.diff

PHP CS Fixer: update usage (#1705)

* modernize calling the tool

* use _dist_ pattern

* update usage of deprecated rule

Changed paths:
  A .php-cs-fixer.dist.php
  D .php-cs-fixer.php
  M .github/workflows/integrate.yaml
  M .gitignore
  M Makefile

Diff:

diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml
index 4267241144..6460672a29 100644
--- a/.github/workflows/integrate.yaml
+++ b/.github/workflows/integrate.yaml
@@ -95,7 +95,7 @@ jobs:
         run: "composer install --ansi --no-interaction --no-progress"

       - name: "Run friendsofphp/php-cs-fixer"
- run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --show-progress=dots --verbose"
+ run: "vendor/bin/php-cs-fixer check --diff --show-progress=dots --verbose --ansi"

       - name: "Get libxml2-utils"
         run: |
diff --git a/.gitignore b/.gitignore
index 5fa5cd36ef..f59a0e8c75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/.build/
+/.php-cs-fixer.php
/vendor/

backend/mirror.gif
diff --git a/.php-cs-fixer.php b/.php-cs-fixer.dist.php
similarity index 98%
rename from .php-cs-fixer.php
rename to .php-cs-fixer.dist.php
index feb6b4a4dd..49f50d793b 100644
--- a/.php-cs-fixer.php
+++ b/.php-cs-fixer.dist.php
@@ -35,6 +35,7 @@
         'indentation_type' => true,
         'is_null' => true,
         'line_ending' => true,
+ 'modifier_keywords' => true,
         'new_with_parentheses' => true,
         'no_extra_blank_lines' => true,
         'no_mixed_echo_print' => true,
@@ -64,7 +65,6 @@
         ],
         'trim_array_spaces' => true,
         'unary_operator_spaces' => true,
- 'visibility_required' => true,
         'void_return' => true,
         'whitespace_after_comma_in_array' => true,
     ]);
diff --git a/Makefile b/Makefile
index 724f253731..a99a403775 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ code-coverage: vendor ## Collects code coverage from running unit tests with php

.PHONY: coding-standards
coding-standards: vendor ## Fixes code style issues with friendsofphp/php-cs-fixer
- vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --show-progress=dots --verbose
+ vendor/bin/php-cs-fixer fix --diff --show-progress=dots --verbose

.PHONY: help
help: ## Displays this list of targets with descriptions