Skip to content
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

Add SimpleXMLElement::__set() method handling #10535

Closed
kthaler opened this issue Jan 9, 2024 · 2 comments · Fixed by #10536
Closed

Add SimpleXMLElement::__set() method handling #10535

kthaler opened this issue Jan 9, 2024 · 2 comments · Fixed by #10536

Comments

@kthaler
Copy link

kthaler commented Jan 9, 2024

Description

As of #10049, we are unable to dynamically set properties in a SimpleXMLElement. So code like $xmlElement->newProp = $newVal causes psalm to flag the line with a InvalidPropertyAssignment error.

Potential Solution

We suggest updating the Psalm stubs for SimpleXMLElement to include handling of the __set() method.

Copy link

Hey @kthaler, can you reproduce the issue on https://psalm.dev ?

@orklah
Copy link
Collaborator

orklah commented Jan 9, 2024

Seems fine, could you push a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants