-
Notifications
You must be signed in to change notification settings - Fork 8k
ext/standard: validate mode in array_filter() #15647
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
base: master
Are you sure you want to change the base?
Conversation
|
I think this might be safer to go through deprecation first. |
|
Technically it's a BC break as the invalid mode is currently ignored. |
|
Makes sense. I will wait for PHP 8.5. I was following a similar change with |
|
A deprecation is certainly more user friendly, but requiring the RFC process for this appears to be overkill. After all, users are not supposed to pass nonsense to well documented functions. |
|
Well just that something users are not supposed to do, does not mean that it's not a BC break. In my opinion it is a BC break and as such we should go through the deprecation. I agree that doing RFC is overkill but I don't think we need RFC if we get some sort of agreement. |
9245732 to
2111c36
Compare
iluuu1994
left a comment
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.
LGTM. I wouldn't object to this in a minor version, but @bukka should confirm whether he does. If so, you can just change the error to a deprecation. According to the policy:
https://github.com/php/policies/blob/main/release-process.rst#feature-selection-and-development
However, any change that breaks user-facing backward compatibility MUST go through the RFC process.
From a pedantic PoV, this is breaking. In that case, this would even need an entry in the deprecation RFC.
Validates
modein the functionarray_filter()and creates complementaryARRAY_FILTER_USE_VALUEwithout exposing it as a PHP constant.