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
PHP 8.3 issues? #1
Comments
I don't have PHP 8.3 in my Linux distribution's repository so that's the first time I hear about it. I'm surprised that API is being implemented in PHP because it's marked as "legacy" in DOM but in retrospect I realize I should have played it safe and maybe rename the userland implementation to avoid conflicts. At the moment I don't see any other way than just change the return types of |
Oh, I've just realized that past me was much more considerate of future me than I thought and that |
In the end, I only had to change Moving forward I intend to remove the userland implementations from the class. A polyfill can be implemented via magic methods so that PHP >= 8.3 always uses the native implementation. |
This resolved the issue. Thanks! |
What do you make of this (saw this while running unit tests with PHP 8.3 for a phpBB extension)
PHP Fatal error: Declaration of s9e\SweetDOM\Element::insertAdjacentElement(string $where, s9e\SweetDOM\Element $element): s9e\SweetDOM\Element must be compatible with DOMElement::insertAdjacentElement(string $where, DOMElement $element): ?DOMElement in /home/runner/work/phpBB/vendor/s9e/sweetdom/src/Element.php on line 141
The text was updated successfully, but these errors were encountered: