Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Non-standard exit codes in phpcbf makes it hard to integrate it #1359

Closed
esamattis opened this issue Feb 18, 2017 · 3 comments
Closed

Non-standard exit codes in phpcbf makes it hard to integrate it #1359

esamattis opened this issue Feb 18, 2017 · 3 comments

Comments

@esamattis
Copy link

Hi!

I tried to integrate phpcbf to neoformat (issue 54) but that seems to be impossible without a wrapper script because phpcbf returns a non-zero exit status on success. In POSIX systems exit status should be zero always when the program executed as it was suposed to. More info http://stackoverflow.com/questions/1101957/are-there-any-standard-exit-status-codes-in-linux

I'd recommend that the non-standard exit codes introduced in #1270 would be moved under a flag (or just removed).

@esamattis esamattis changed the title Non-standard exits in phpcbf makes it hard to integrade it Non-standard exit codes in phpcbf makes it hard to integrade it Feb 18, 2017
@esamattis esamattis changed the title Non-standard exit codes in phpcbf makes it hard to integrade it Non-standard exit codes in phpcbf makes it hard to integrate it Feb 18, 2017
@gsherwood
Copy link
Member

PHPCBF has several exit states and so has several exit codes. You'll need to check the exit code and decide if the script exited the way you expected because I'm not changing the current codes. They've been there in PHPCS and PHPCBF for years and checking the return value of a script is pretty easy.

@esamattis
Copy link
Author

Fair enough. I do appreciate preserving backwards compatibility. I though this was a new thing in 3.0.0RC3.

@deleugpn
Copy link

Just in case anybody else lands on this issue, the command #1818 (comment) is very helpful to start making your own workaround

lkraav added a commit to conversionxl/phpcs-ruleset that referenced this issue Sep 24, 2020
lkraav added a commit to conversionxl/phpcs-ruleset that referenced this issue Sep 24, 2020
lkraav added a commit to conversionxl/phpcs-ruleset that referenced this issue Sep 24, 2020
lkraav added a commit to conversionxl/phpcs-ruleset that referenced this issue Sep 24, 2020
lkraav added a commit to conversionxl/phpcs-ruleset that referenced this issue Sep 24, 2020
lkraav added a commit to conversionxl/phpcs-ruleset that referenced this issue Sep 24, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants