You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #1079 originally included a commit to also use the new ExitCode::calculate() method when the fixer runs over code provided via STDIN.
Unfortunately, that didn't work as intended, so for now, phpcbf will always return with a 0 exit code when ran over code provided via STDIN.
It should be investigated why the patch didn't work as expected and a fix to start using the proper exit code should be pulled.
Preferably such a patch should be accompanied by a set of tests covering the change, though creating these tests may not be that straight-forward as STDIN would need to be manipulated.
jrfnl
changed the title
Use the scan exit codes when fixing code provided via STDIN
Use the new exit codes when fixing code provided via STDIN
May 7, 2025
PR #1079 originally included a commit to also use the new
ExitCode::calculate()
method when the fixer runs over code provided via STDIN.Unfortunately, that didn't work as intended, so for now,
phpcbf
will always return with a0
exit code when ran over code provided via STDIN.It should be investigated why the patch didn't work as expected and a fix to start using the proper exit code should be pulled.
Preferably such a patch should be accompanied by a set of tests covering the change, though creating these tests may not be that straight-forward as
STDIN
would need to be manipulated.Also see: #1079 (comment)
For reference, this is the patch file of the originally proposed change:
Patch file contents
The text was updated successfully, but these errors were encountered: