Repository navigation
ext/mbstring: Fix truncated encoding names resolving to full names - #23974
kamil-tekiela wants to merge 3 commits into
Conversation
youkidearitai
left a comment
There was a problem hiding this comment.
Thanks, nice catch!
LGTM.
|
I don't know if I would say that the problem was really caused by |
|
...But otherwise, the fix is good. :) @ndossche Do you think we should cache |
|
|
@alexdowad Maybe you can help me with this one. https://3v4l.org/0qeOF#v I think neither "a", "au", nor "aut" should match, but it looks like this is a fallback mechanism that converts empty list into an "auto". I don't actually know how this should be fixed. What do you recommend? There is a comment in gh15824.phpt that makes me think this was an intentional change. |
|
@kamil-tekiela Hmm. I just looked at gh15824.phpt, but I don't understand how it implies that "this was an intentional change". |
Perhaps, should be simple enough for the master branch.
Same here, this is about a trailing comma. |
Maybe I misunderstood the comment. So in your opinion what should be done about |
I think it does make sense to validate For both that and the main bug fix which @kamil-tekiela kindly included in this PR, Hyrum's law does apply. It will almost certainly break some code written by someone, somewhere. But we can't keep unintended changes forever because of that. If this behavior was introduced in PHP 8.4, it's an unintended change and I think it should be fixed. |
|
@alexdowad given your statement, I added another commit to fix the "auto" to pre-PHP 8.4. I think all of it is now back to PHP 8.3 behaviour https://3v4l.org/L5V1Y#v I also removed the misleading trailing comma from the other test which was the easiest way to fix that test, but I still don't understand what that comment meant. |
It looks like @youkidearitai added that test. I think he probably felt that it would be good to make |
Introduced by 3ad422ebd0b
@ndossche
Fixes #23958