Uh oh!
There was an error while loading. Please reload this page.
array_change_key_case(): Throw ValueError on invalid argument - #15883
Conversation
cmb69
left a comment
There was a problem hiding this comment.
Thank you! Looks good. Also nice to get of the contrived test cases.
jorgsowa
commented
Oct 29, 2024
Do we need RFC for such changes? I have similar PR in #15647 |
cmb69
commented
Oct 30, 2024
I don't think such changes require an RFC (maybe in theory, but barely practical). Given #16641, we may consider to be more conservative, and deprecate passing anything but |
bukka
commented
Nov 2, 2024
I think we should maybe put a general RFC how to deal with this. My preference is really to go through deprecations. I don't think we need to do RFC for each case but having some agreement (e.g. or possibly a single RFC) would be good. |
bukka
commented
Nov 2, 2024
Btw. if we agree that deprecations are better for those case, I don't think we need RFC. |
Girgias
commented
Nov 2, 2024
Those should be warnings not deprecations if we are not turning them into ValueErrors. |
cmb69
commented
Nov 2, 2024
I would turn them into |
5636b64 to
8355060Compare| if (change_to_upper == PHP_CASE_UPPER) { | ||
| new_key = zend_string_toupper(string_key); | ||
| } else { | ||
| new_key = zend_string_tolower(string_key); | ||
| } |
There was a problem hiding this comment.
A switch() might potentially be clearer here.
Uh oh!
There was an error while loading. Please reload this page.
DanielEScherzer
commented
Apr 10, 2026
Should this be added to NEWS/UPGRADING? |
Girgias
commented
Apr 10, 2026
Done, also fixed UPGRADING. Because once again some of the ValueErrors where in "changed function"... |
This should be merged after 8.4 has been cut.