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

Deprecation of mb_convert_encoding with HTML-ENTITIES in PHP 8.2 #44

Closed
wants to merge 1 commit into from

Conversation

HenKun
Copy link

@HenKun HenKun commented May 31, 2023

Copy link
Owner

@wasinger wasinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Symfony DOM Crawler (from which this code was taken originally) now uses mb_encode_numericentity, see https://github.com/symfony/dom-crawler/blob/6.3/Crawler.php#L1111
I'd prefer using the symfony approach to keep compatibility as high as possible (If the parseXhtml and convertToHtmlEntities methods were not private in the Crawler base class, I would definitely use them directly.)

@wasinger
Copy link
Owner

The latest master version now uses the convertToHtmlEntities function from Symfony 6 Crawler which uses mb_encode_numericentity instead of mb_convert_encoding. This way the problem should be solved. I'm closing this PR because it is not needed any more.

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.

None yet

2 participants