CI: Add PHP CS Fixer check (dry-run only) #810
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
To improve code quality consistency without introducing risky automatic mutations, we are introducing a non-destructive PHP CS Fixer check into the CI pipeline.
Previously, coding-style violations could slip through unnoticed until later stages or manual review.
This change ensures formatting issues are surfaced early while keeping all fixes explicitly developer-controlled.
The goal is visibility and enforcement — not automatic code changes in CI.
Description
A new PHP CS Fixer (check-only) job was added to the CI workflow.
The job runs php-cs-fixer in dry-run mode using the existing .php-cs-fixer.php configuration, failing the workflow if violations are detected while only printing diffs.
No files are modified by CI, and no existing configuration files were changed.
The check runs only when the PR branch is up-to-date with its base branch and blocks further jobs on failure.
Changes in the codebase (optional)
Added a CI job: PHP CS Fixer (Check Only)
Uses existing fixer config (.php-cs-fixer.php)
Executes via Composer script:
"php-cs-fixer fix --dry-run --diff"
No automatic fixes, commits, or repository mutations
Additional information (optional)
CI reports style violations clearly via diff output
Developers must fix issues locally before pushing
This follows the same “check-only” philosophy used for PHPStan and SQL validation
No Discord notification was added for this job to avoid noise; failures are visible directly in CI
Links