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
Require mbstring
with v3
#157
Comments
Actually you may not need the
|
@ghostwriter As written in Slack, this would then require |
@boesing right. also came up with this: if (strlen($string) !== strlen(html_entity_decode($string, ENT_QUOTES , 'ISO-8859-1')))
{
echo 'string is unicode';
}
// another method
var_dump(in_array('html_entity_decode', get_defined_functions()['internal'])); // bool(true) |
The main thing I dont like here is, that There were performance checks in #154 (comment) regarding performance and thus I'd like to avoid doing it twice. Thus, requiring mbstring seems the most proper way of veryfing the length of a string with a minimal footprint. |
Closing this with the rationale, that allowing keys longer than |
good point. For the record I was trying to find a solution to the particular issue. I’m not against adding |
Feature Request
Summary
As this library supports
PSR-6
andPSR-16
, it also needs ways to handle multibyte strings which are allowed as per these recommendations.To fix #154 properly, a multibyte check needs to be done when a key exceeds a certain limit.
This is actually only the case for the redis adapter, so until v3, the redis adapter will decrease its maximum key length to
65534
as65535
is the maximum number to be used as a specifier forpcre2
.https://3v4l.org/GURWn
The text was updated successfully, but these errors were encountered: