Bug report
When overriding DOMDocument::saveHTML(), I get rather random signature mismatches that have nothing to do with the documented signature.
Parameter #1 $node (DOMNode|null) of method ExtendedDocument::saveHTML() is not contravariant with parameter #1 $node (mixed) of method DOMDocument::saveHTML().
Even worse - just returning parent::saveHTML() from the extending method, PHPStan claims the return type does not match, even though it deduced it itself from the parent.
Method ExtendedDocument::saveHTML() should return string but returns string|false.
Code snippet that reproduces the problem
This code snippet replicates the problem: https://phpstan.org/r/f2176152-5861-4451-a9b4-da32795c2b8f
Expected output
The above snippet should not throw any errors.
Bug report
When overriding
DOMDocument::saveHTML(), I get rather random signature mismatches that have nothing to do with the documented signature.Even worse - just returning
parent::saveHTML()from the extending method, PHPStan claims the return type does not match, even though it deduced it itself from the parent.Code snippet that reproduces the problem
This code snippet replicates the problem: https://phpstan.org/r/f2176152-5861-4451-a9b4-da32795c2b8f
Expected output
The above snippet should not throw any errors.