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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/functionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.

'DOMNode::lookupPrefix' => ['string', 'namespaceuri'=>'string'],
'DOMNode::normalize' => ['void'],
'DOMNode::removeChild' => ['DOMNode', 'oldnode'=>'DOMNode'],
Expand Down