-
-
Notifications
You must be signed in to change notification settings - Fork 922
[regression] DOMElement::$attributes is considered nullable #13076
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
Comments
The PR JetBrains/phpstorm-stubs#1741 might be wrong ; do you want to provide a PR to revert it @Jean85 ? But then, we'll get the always true issue reported by Related PR phpstan/phpstan-src#3800. There is maybe a bug to fix first with phpstan-assert-if-true |
Yes I agree, JetBrains/phpstorm-stubs#1741 IS wrong. That attribute is overriding I'll suggest a revert. |
WIP on PHPStan side phpstan/phpstan-src#4029 |
Bug report
Upgrading from 2.1.16 to 2.1.17 facile-it/paraunit#318
I get a regression where
DOMElement::$attributes
is considered nullable, where it's not. Proof: https://www.php.net/manual/en/class.domnode.php#domnode.props.attributesThe property is nullable for its ancestor (
\DOMNode
), but not in this case.Code snippet that reproduces the problem
https://phpstan.org/r/ce94a684-3de4-4a48-9441-b5586c967fac
Expected output
No errors, since it shouldn't be nullable.
Did PHPStan help you today? Did it make you happy in any way?
Totally! So many bug catched early!
The text was updated successfully, but these errors were encountered: