Well, that worked with PHP 8.1 but not so well with 8.2. After some more research, my solution would be this:
/src/vendor/symfony/dom-crawler/Crawler.php line 196
That older function mb_convert_encoding does not support HTML entities anymore in PHP 8.2 which is probably the reason behind this change. However in new version that iconv which converts string from UTF-8 to ISO-8859-1 seems to be causing problems. I actually don't know why is it there as things seem to be fine (actually better) without it? But maybe someone who actually knows something about these things can share some knowledge.
/src/vendor/symfony/dom-crawler/Crawler.php line 196
$content = htmlspecialchars_decode(htmlentities($content, ENT_COMPAT, 'UTF-8'), ENT_QUOTES);
That older function mb_convert_encoding does not support HTML entities anymore in PHP 8.2 which is probably the reason behind this change. However in new version that iconv which converts string from UTF-8 to ISO-8859-1 seems to be causing problems. I actually don't know why is it there as things seem to be fine (actually better) without it? But maybe someone who actually knows something about these things can share some knowledge.