-
Notifications
You must be signed in to change notification settings - Fork 34
Remove mbstring.func_overload compatibility layer
#58
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
Remove mbstring.func_overload compatibility layer
#58
Conversation
|
The |
That's why I did not remove it and just marked it as Deprecated. |
|
It's not deprecated, either. Too many things use it, and marking it as deprecated will cause downstream issues with e.g. Psalm. |
|
Okay. Are you requesting me to drop the Deprecation commit? Shall I make any other changes to this PR or are the first two commits good? |
|
@paragonie-security Friendly ping regarding my question above. I'm happy to make the necessary changes to the PR, but would need to know what changes I should make. |
|
There are many downstream projects that depend on the Marking it as deprecated is harmful because those libraries, which may have wide PHP supported bases, will start getting deprecation warnings on PHP 8 and then scramble to update their code in less secure ways. See facebookarchive/php-graph-sdk#552 (comment) for why this code existed in the first place. If we ever deprecate this, it must only occur after the entire PHP ecosystem has abandoned PHP < 8.0. There are still stragglers, so we cannot do that today. |
The `mbstring.func_overload` misfeature no longer exists in PHP 8.x which is now the minimally supported version. Thus we can directly use `strlen()` and `substr()` and avoid the indirection through the `Binary` class, improving performance.
`mbstring.func_overload` is no more, thus this can be a direct wrapper of `strlen()` and `substr()` respectively.
Understood. I'm taking your reply as “please drop the commit marking the deprecation, the other two commits are okay” and just pushed that change. I hope the PR is good now 🤞 |
|
And yes, I am aware. That's why I called the INI setting a “misfeature” in my PR description 😄 Thank you! |
The
mbstring.func_overloadmisfeature no longer exists in PHP 8.x which is now the minimally supported version. Thus we can directly usestrlen()andsubstr()and avoid the indirection through theBinaryclass, improving performance.