Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TimWolla
Copy link
Contributor

@TimWolla TimWolla commented May 8, 2024

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.

TimWolla added 3 commits May 8, 2024 20:14
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.
@paragonie-security
Copy link
Contributor

The Binary class is used in a lot of other software that depends on this library.

@TimWolla
Copy link
Contributor Author

The Binary class is used in a lot of other software that depends on this library.

That's why I did not remove it and just marked it as Deprecated.

@paragonie-security
Copy link
Contributor

It's not deprecated, either. Too many things use it, and marking it as deprecated will cause downstream issues with e.g. Psalm.

@TimWolla
Copy link
Contributor Author

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?

@TimWolla
Copy link
Contributor Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants