Uh oh!
There was an error while loading. Please reload this page.
ext/standard: pathinfo() check flags argument validity. - #17859
Conversation
ndossche
left a comment
There was a problem hiding this comment.
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?
devnexen
commented
Feb 23, 2025
well PHP_PATHINFO_ALL is itself a combination |
ndossche
commented
Feb 23, 2025
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. |
devnexen
commented
Feb 23, 2025
yeah quite a bunch of tests to update following this. |
ndossche
commented
Feb 24, 2025
Ouch. Then I wonder if this is worth it and whether Hyrum's law applies. |
devnexen
commented
Feb 24, 2025
exactly |
TimWolla
commented
Feb 24, 2025
It's effectively the same situation as with the |
bukka
commented
Feb 24, 2025
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. |
Girgias
commented
Apr 6, 2026
Policy RFC has been accepted, could this be rebased? |
No description provided.