Skip to content

Conversation

@diafour
Copy link
Contributor

@diafour diafour commented Jan 17, 2020

Hello! This is a continuation of #4466 with some enhancements:

  • php_opt_error returns -2 instead of '?' to distinguish between requested help and errors
  • set show_error argument to true, so cli and cgi print error to sdterr

@diafour
Copy link
Contributor Author

diafour commented Jan 18, 2020

This PR tries to fulfill some thoughts from this review: #4466 (review)

Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, I'd only like to see the new -2 value given a proper name. Like PHP_GETOPT_INVALID_ARG or so.

@nikic
Copy link
Member

nikic commented Jan 23, 2020

I think this should be fine for 7.3. It changes the exit code, but only in an error case, where execution of the program is aborted. As such, I don't see how this could cause a practical backwards compatibility issue. Does anyone have concerns about this?

Copy link

@chamajcpradel chamajcpradel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sirs. I will have to adjust my local scripts. LGTM.

@nikic
Copy link
Member

nikic commented Jan 27, 2020

Merged as fd08f06 into 7.3. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants