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

Avoid deprecation notice when using utf8_decode #299

Closed
wants to merge 2 commits into from

Conversation

KminekMatej
Copy link

  • bug fix
  • BC break? no

PHP 8.2 throws deprecation notice on utf8_encode and utf8_decode functions. Strings::length used utf8_decode to determine correct length of string - using mb_strlen, or natively using utf8_decode. I refactored this function to use mbstring or iconv extensions to determine correct length.

User can no longer run Strings::length() function without at least one of these extensions, however since they are super common extensions I dont see this as s problem nowadays

@dg
Copy link
Member

dg commented Sep 10, 2023

I did it a little bit differently.

@KminekMatej
Copy link
Author

Even better

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