-
Notifications
You must be signed in to change notification settings - Fork 650
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
Incorrect signature/stub used for XMLWriter::startElementNs #6091
Labels
Comments
I found these snippets: https://psalm.dev/r/216f3978ac<?php
$xw = new XMLWriter();
$xw->startElementNs(null, "foo", null);
$xw->endElement();
|
Thanks! I will try to make a PR with checked/updated XMLWriter stubs somewhere in the next week. |
aboks
added a commit
to aboks/psalm
that referenced
this issue
Jul 15, 2021
Checked and fixed the following, based on the current documentation in the PHP manual: * capitalization in method names * parameter names * parameter types (especially for nullable params) * return types (especially for '|false'-types) * differences between pre- and post-8.0.0-signatures Fixes vimeo#6091
weirdan
pushed a commit
to aboks/psalm
that referenced
this issue
Jul 17, 2021
Checked and fixed the following, based on the current documentation in the PHP manual: * capitalization in method names * parameter names * parameter types (especially for nullable params) * return types (especially for '|false'-types) * differences between pre- and post-8.0.0-signatures Fixes vimeo#6091
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to the PHP documentation the 1st and 3rd parameters to
XMLWriter::startElementNs()
acceptstring|null
; see https://www.php.net/manual/en/xmlwriter.startelementns. However, Psalm complains whennull
is passed as an argument to this method: https://psalm.dev/r/216f3978ac.Unfortunately I cannot find where Psalm infers these method signatures from; they don't seem to be in the
/stubs
folder. I would be happy to check and correct the method signatures if I know where to find them.The text was updated successfully, but these errors were encountered: