-
-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Describe the bug
Excuse me if this is intentional, but it's kind of weird / annoying.
Prior to 4.0.0 on "No fixable errors were found" phpcbf
would return a success exit code of 0

With the release of 4.0.0 phpcbf
now seems to return an exit code of 2 on "No fixable errors"

It's frankly kind of weird to return a 2
on success, and it breaks our automations. That's fixable, but I want to make sure that this is an intentional change before I fix it on our side.
Code sample
vendor/bin/phpcbf ; echo 'exit code ' $?
Custom ruleset
N/A
To reproduce
Steps to reproduce the behavior:
- Run
phpcbf
with no fixes made - Examine exit code
Expected behavior
Exit code 0
Versions (please complete the following information)
Operating System | macOS 15.6.1 |
PHP version | 8.3 |
PHP_CodeSniffer version | 4.0.0 |
Standard | custom |
Install type | Composer local |
Additional context
Add any other context about the problem here.
Please confirm
- I have searched the issue list and am not opening a duplicate issue.
- I have read the Contribution Guidelines and this is not a support question.
- I confirm that this bug is a bug in PHP_CodeSniffer and not in one of the external standards.
- I have verified the issue still exists in the
4.x
branch of PHP_CodeSniffer.
duchymor