Closed rdmpage closed 2 years ago
Fix is to remove from composer.json
and add relevant files to repository:
|
+-- HtmlDomParser.php
|
+--simplehtmldom_1_5
|
+-- simple_html_dom.php
Then patch simple_html_dom.php
. To include the class we simply:
require_once (dirname(__FILE__) . '/HtmlDomParser.php');
This loads the patched version of the code.
Fixed with c1fb32b9002583547f122a57539120d0320bb6e1
Sunra\PhpSimple\HtmlDomParser doesn't work on more recent versions of PHP (e.g., 7.4.29) throwing regular expression compilation errors. This is a know bug (see e.g. https://github.com/sunra/php-simple-html-dom-parser/issues/87) and there is at least one pull request to fix it (e.g., https://github.com/sunra/php-simple-html-dom-parser/pull/88) but looks like development has basically stopped so I can't simply update
composer.json
.