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 DOM callmaps #9460

Merged
merged 1 commit into from Mar 6, 2023
Merged
Show file tree
Hide file tree
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
144 changes: 72 additions & 72 deletions dictionaries/CallMap.php

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions dictionaries/CallMap_80_delta.php
Expand Up @@ -41,9 +41,9 @@
'old' => ['int|false'],
'new' => ['int'],
],
'DateTime::diff' => [
'old' => ['DateInterval|false', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'],
'new' => ['DateInterval', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'],
'CURLFile::__construct' => [
'old' => ['void', 'filename'=>'string', 'mime_type='=>'string', 'posted_filename='=>'string'],
'new' => ['void', 'filename'=>'string', 'mime_type='=>'?string', 'posted_filename='=>'?string'],
],
'DateTime::format' => [
'old' => ['string|false', 'format'=>'string'],
Expand All @@ -53,10 +53,6 @@
'old' => ['int|false'],
'new' => ['int'],
],
'DateTime::setTime' => [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These never officially returned false. The return from an invalid parameter was always undefined behavior and PHP does not document these changes when parameter parsing throws instead of returning null/false.

'old' => ['static|false', 'hour'=>'int', 'minute'=>'int', 'second='=>'int', 'microseconds='=>'int'],
'new' => ['static', 'hour'=>'int', 'minute'=>'int', 'second='=>'int', 'microseconds='=>'int'],
],
'DateTimeInterface::getTimestamp' => [
'old' => ['int|false'],
'new' => ['int'],
Expand Down Expand Up @@ -93,6 +89,14 @@
'old' => ['SplFileObject', 'mode='=>'string', 'useIncludePath='=>'bool', 'context='=>'resource'],
'new' => ['SplFileObject', 'mode='=>'string', 'useIncludePath='=>'bool', 'context='=>'?resource'],
],
'DOMDocument::getElementsByTagNameNS' => [
'old' => ['DOMNodeList', 'namespace'=>'string', 'localName'=>'string'],
'new' => ['DOMNodeList', 'namespace'=>'?string', 'localName'=>'string'],
],
'DOMImplementation::createDocument' => [
'old' => ['DOMDocument|false', 'namespace='=>'string', 'qualifiedName='=>'string', 'doctype='=>'DOMDocumentType'],
'new' => ['DOMDocument|false', 'namespace='=>'?string', 'qualifiedName='=>'string', 'doctype='=>'?DOMDocumentType'],
],
'ErrorException::__construct' => [
'old' => ['void', 'message='=>'string', 'code='=>'int', 'severity='=>'int', 'filename='=>'string', 'line='=>'int', 'previous='=>'?Throwable'],
'new' => ['void', 'message='=>'string', 'code='=>'int', 'severity='=>'int', 'filename='=>'?string', 'line='=>'?int', 'previous='=>'?Throwable'],
Expand Down
4 changes: 4 additions & 0 deletions dictionaries/CallMap_81_delta.php
Expand Up @@ -66,6 +66,10 @@
'old' => ['DOMDocumentFragment|false'],
'new' => ['DOMDocumentFragment'],
],
'DOMDocument::createTextNode' => [
'old' => ['DOMText|false', 'data'=>'string'],
'new' => ['DOMText', 'data'=>'string'],
],
'Phar::buildFromDirectory' => [
'old' => ['array|false', 'directory'=>'string', 'pattern='=>'string'],
'new' => ['array', 'directory'=>'string', 'pattern='=>'string'],
Expand Down