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

Handling HTML entities via mbstring is deprecated in PHP 8.2 #120

Closed
aboks opened this issue May 26, 2023 · 3 comments
Closed

Handling HTML entities via mbstring is deprecated in PHP 8.2 #120

aboks opened this issue May 26, 2023 · 3 comments

Comments

@aboks
Copy link

aboks commented May 26, 2023

When using this library with PHP 8.2 it yields deprecation warnings like

Deprecated:  mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in [...]/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/ListDiffLines.php on line 87
richardbrinkman pushed a commit to richardbrinkman/php-htmldiff that referenced this issue Aug 8, 2023
@Ambient-Impact
Copy link

I'm still getting this but for TableDiff:

Deprecated function: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in Caxy\HtmlDiff\Table\TableDiff->createDocumentWithHtml() (line 630 of /var/www/html/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/Table/TableDiff.php).

@sarahwylie
Copy link

I'm receiving the same error as @Ambient-Impact - any possible solutions yet?

@Ambient-Impact
Copy link

@sarahwylie Not much I can do but there's open pull request #125 which should fix the PHP notice when it's merged. If you need it sooner, you can try pointing Composer to that pull request or patching the package yourself.

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

No branches or pull requests

3 participants