-
Notifications
You must be signed in to change notification settings - Fork 810
Narrow bool return types to true when possible #2458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text in the return value must be amended for XML at least.
Also the XML functions did return false on an invalid resource type in PHP 7, but I think we consider this to be UB so no need to document.
@kamil-tekiela do you know since when the Mysqli functions only return true?
It was changed in php/php-src#5058, but as I understand standalone true is only possible since 8.2.
|
Okay that's just what I wanted to know if we need a changelog, which seems like we do for PHP 8.0 if it isn't already there. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than openlog()
everything LGTM
&return.success; | ||
&return.true.always; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this used to return false in 8.0, so this needs some more investigation of what version this changed and why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But since it's a PHP 8.3 change (he only committed it to master in last August), I should revert this change :S
No description provided.