Creation of dynamic property Rct567\DomQuery\DomQuery::$dom_xpath is deprecated
kocoten1992 opened this issue · comments
Creation of dynamic property Rct567\DomQuery\DomQuery::$dom_xpath is deprecated in vendor/rct567/dom-query/src/Rct567/DomQuery/DomQueryNodes.php on line 171.
Hello, thanks for the library, I got the error when run php 8.2, dynamic property is deprecated (https://php.watch/versions/8.2/dynamic-properties-deprecated).
To trigger the error:
$dom = new DomQuery('<div><h1 class="title">Hello</h1></div>');
$dom->find('randomtag')->html()
dom_xpath is already a method is the dev branch. Do you get any errors when using that branch? Either way, a #[AllowDynamicProperties]
is preferred :)
Hi there, I've not test yet, currently I'm using @
to supress it 😆, I will close this issue with the PR then, thanks for the library!