-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
ext/standard: pathinfo() check flags argument validity. #17859
base: master
Are you sure you want to change the base?
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.
Interesting function with a bit of a surprising implementation, ngl.
Note that passing something like PHP_PATHINFO_DIRNAME|PHP_PATHINFO_BASENAME
still is allowed but is equivalent to only passing PHP_PATHINFO_DIRNAME
as a flag, which is quite bonkers. So perhaps bitwise combinations should also be blocked?
well PHP_PATHINFO_ALL is itself a combination |
Yeah but that is the only case where you get the array, so it's an exception to the rule that only one flag should be passed. |
yeah quite a bunch of tests to update following this. |
Ouch. Then I wonder if this is worth it and whether Hyrum's law applies. |
exactly |
It's effectively the same situation as with the |
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.
This makes sense to me, but needs to be listed in UPGRADING as a backwards incompatible change, like
Line 125 in fc73da5
. php_uname() now throws ValueErrors if the $move parameter is invalid. |
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.
I can see that various change in pcntl got in. Ideally we should maybe update the policy to extend a bit what kind of breaks are allowed in minor versions and what should go through the deprecations as it's currently pretty inconsistent. |
No description provided.