Text-Statistics icon indicating copy to clipboard operation
Text-Statistics copied to clipboard

Fix PHP 8.2 deprecations

Open seanBlommaert opened this issue 1 year ago • 1 comments

Because of the misleading function names, lack of error messages and warnings, and the lack of support for character encodings other than ISO-8859-1, utf8_encode and utf8_decode functions are deprecated in PHP 8.2.

This is being used in \DaveChild\TextStatistics\Text::cleanText()

We can replace it with the code below, or maybe see if we can remove it? $strText = mb_convert_encoding($strText, 'ISO-8859-1', mb_detect_encoding($strText));

seanBlommaert avatar Jul 08 '24 08:07 seanBlommaert

I see there already is a PR for this: https://github.com/DaveChild/Text-Statistics/pull/56 (and more 8.2 deprecations).

seanBlommaert avatar Jul 08 '24 08:07 seanBlommaert