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
DOMDocument::$preserveWhitespace
should be reported as dynamic property. Not $preserveWhiteSpace
#8915
Labels
bug
easy problems
Issues that can be fixed without background knowledge of Psalm
good first issue
internal stubs/callmap
Comments
I found these snippets: https://psalm.dev/r/a2760ed2e5<?php
$dom = new DOMDocument;
$dom->preserveWhiteSpace = false;
$dom->preserveWhitespace = false; // should be reported as dynamic property
$dom->PreserveWhitespace = false;
$dom->preservewhitespace = false;
// PropertyMap `'strictErrorChecking' => 'bool',`
$dom->strictErrorChecking = false;
$dom->strictErrorchecking = false;
|
Psalm seems to think both are present: https://psalm.dev/r/3015ffd278 |
I found these snippets: https://psalm.dev/r/3015ffd278<?php
$dom = new DOMDocument;
$v = get_object_vars($dom);
/** @psalm-trace $v */;
|
'preserveWhiteSpace' likely comes from reflection, while 'preserveWhitespace' is from the property map. |
weirdan
added
bug
internal stubs/callmap
easy problems
Issues that can be fixed without background knowledge of Psalm
good first issue
labels
Dec 17, 2022
sasezaki
added a commit
to sasezaki/psalm
that referenced
this issue
Dec 17, 2022
sasezaki
added a commit
to sasezaki/psalm
that referenced
this issue
Dec 17, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
easy problems
Issues that can be fixed without background knowledge of Psalm
good first issue
internal stubs/callmap
Hi. I noticed that psalm would not report
DOMDocument::$preserveWhitespace
is dynamic property.( When after I saw this commit php/doc-base@9965c2b )
php-src declares as
preserveWhiteSpace
.https://github.com/php/php-src/blob/027add9e1bf935c2d874f736105cced87fdeb226/ext/dom/php_dom.stub.php#L679
https://psalm.dev/r/a2760ed2e5
It seems current PropertyMap is mistaken.
But I don't know why currently
$dom->preserveWhiteSpace
is not reported as ERROR against case sensitive...The text was updated successfully, but these errors were encountered: