-
Notifications
You must be signed in to change notification settings - Fork 668
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
added mysqli::connect() to callmap #6805
Conversation
dictionaries/CallMap_81_delta.php
Outdated
@@ -627,6 +627,10 @@ | |||
'old' => ['bool', 'ldap'=>'resource', 'callback'=>'string'], | |||
'new' => ['bool', 'ldap'=>'LDAP\Connection', 'callback'=>'string'], | |||
], | |||
'mysqli::connect' => [ | |||
'old' => ['null|false', 'hostname='=>'string', 'username='=>'string', 'password='=>'string', 'database='=>'string', 'port='=>'int', 'socket='=>'string'], | |||
'new' => ['bool', 'hostname='=>'string', 'username='=>'string', 'password='=>'string', 'database='=>'string', 'port='=>'int', 'socket='=>'string'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting with PHP 8 all parameters are nullable:
$ php -v
PHP 8.0.7 (cli) (built: Aug 1 2021 01:14:34) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.7, Copyright (c) Zend Technologies
with Zend OPcache v8.0.7, Copyright (c), by Zend Technologies
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
$ php --rf 'mysqli::connect'
Method [ <internal:mysqli> public method connect ] {
- Parameters [6] {
Parameter #0 [ <optional> ?string $hostname = null ]
Parameter #1 [ <optional> ?string $username = null ]
Parameter #2 [ <optional> ?string $password = null ]
Parameter #3 [ <optional> ?string $database = null ]
Parameter #4 [ <optional> ?int $port = null ]
Parameter #5 [ <optional> ?string $socket = null ]
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before that, they were just optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great find. TIL about php --rf
argument. I think its time to read man php
properly. Thanks for the knowledge.
I've updated mysqli::__construct too, since they are almost same.
I guess I should submit a PR to PHP-doc repo now to reflect this change.
Thanks! |
This PR adds mysqli::connect() function signature to callmap including its change of return value in PHP 8.1
Fixes #6406