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

PHP8.1 xml output supprt #8321

Closed
wouter-toppy opened this issue Jul 26, 2022 · 2 comments · Fixed by #8788
Closed

PHP8.1 xml output supprt #8321

wouter-toppy opened this issue Jul 26, 2022 · 2 comments · Fixed by #8788

Comments

@wouter-toppy
Copy link

Almost simular to #2856

except, its not possible to pass a argument to the function anymore.

Uncaught RuntimeException: PHP Error: DOMDocument::createTextNode(): Passing null to parameter #1 ($data) of type string is deprecated in /app/vendor/openlss/lib-array2xml/LSS/Array2XML.php:174 in /app/vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php:66

Bug is not directly fixable in psalm. but needs to be fixed in the lib-array2-xml bundle.
Reported a issue there, which needs to be fixed and tagged.

if so. than psalm need to require expliceit that version (or higher)

nullivex/lib-array2xml#21

@psalm-github-bot
Copy link

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

@caendesilva
Copy link

Ran into this as well. Psalm v4.30.0 on PHP 8.1.10.

The lib-array2xml repo has not had any updates in over three years. It could be abandoned. Fork?

The workaround is incredibly simple, albeit gruesome. Apply the fix from this PR nullivex/lib-array2xml#19 to the file in the vendor directory.
image

While normally modifying vendor files is a huge no-no for me, since I just need this for a one-off on my local machine it's fine for me, just beware.

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

Successfully merging a pull request may close this issue.

3 participants