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

Fix signature of DOMNode::lookupNamespaceURI #2527

Merged

Conversation

@@ -1988,7 +1988,7 @@
'DOMNode::isDefaultNamespace' => ['bool', 'namespaceuri'=>'string'],
'DOMNode::isSameNode' => ['bool', 'node'=>'DOMNode'],
'DOMNode::isSupported' => ['bool', 'feature'=>'string', 'version'=>'string'],
'DOMNode::lookupNamespaceURI' => ['string', 'prefix'=>'string'],
'DOMNode::lookupNamespaceURI' => ['?string', 'prefix'=>'?string'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure the prefix parameter is nullable?

per php.net docs it is not nullable
https://www.php.net/manual/en/domnode.lookupnamespaceuri.php

I don‘t know the details of the C php sources.. in case you are sure, please consider open a PR for the php.net docs

——

the return type seems fine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment there says so: https://www.php.net/manual/en/domnode.lookupnamespaceuri.php#75556
Also in php-src master: https://github.com/php/php-src/blob/b3553159a7b15d1ddd485aba9f83485f08e2e800/ext/dom/php_dom.stub.php#L378-L379

Also, the referenced C sources don't change except for the return; (7.4.33) changing to RETURN_THROWS(); (master).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ondrejmirtes ondrejmirtes merged commit 62117a9 into phpstan:1.10.x Jul 11, 2023
407 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

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