constant_time_encoding icon indicating copy to clipboard operation
constant_time_encoding copied to clipboard

Remove `mbstring.func_overload` compatibility layer

Open TimWolla opened this issue 1 year ago • 5 comments

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 avatar May 08 '24 18:05 TimWolla

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

paragonie-security avatar Jun 25 '24 13:06 paragonie-security

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.

TimWolla avatar Jun 25 '24 13:06 TimWolla

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

paragonie-security avatar Jun 25 '24 14:06 paragonie-security

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 avatar Jun 25 '24 15:06 TimWolla