You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the problem is that I didn't have the simplexml extension enabled, by either adding ext-simplexml as a dependency in composer.json or via enableExtensions in psalm.xml. With either of those, the errors go away.
I guess this makes sense but I find it surprising to have to make this change in a minor version update.
I'm not 100% sure, but I think the online tool has all extensions enabled. At the very least it appears to have simplexml. Which is why this can't be reproduced there.
Before a4de6d9SimpleXMLElement & SimpleXMLIterator were defined as universal_object_crates, even if the extension was not explicitly enabled, and reflection was used for the signatures.
I don't think it's right to reintroduce the definitions without explicit loading of the extension, so would class this as a bugfix instead of a regression.
I'm running into a couple regressions related to SimpleXMLElement when trying to upgrade to Psalm 5.15:
RedundantCondition
errors when callingisset
on property fetchesasXml
method when no arguments are passedExample code:
For some reason I can't reproduce either issue on psalm.dev, but I've created a repository here: https://github.com/edsrzf/psalm-xml-repro
I'm guessing these are both due to #10049.
The text was updated successfully, but these errors were encountered: