From 995f89e8b9fb8538ca163fbeab4fcce63c6820e4 Mon Sep 17 00:00:00 2001 From: sji Date: Tue, 26 Jan 2021 01:04:30 +0900 Subject: [PATCH] Fix CallMap of PDOStatement for PHP8 (#5100) The definitions are based on the php-src stub. https://github.com/php/php-src/blob/4bbb98c24fa691c176e403ab00a2fe3dd4224b3e/ext/pdo/pdo_stmt.stub.php --- dictionaries/CallMap.php | 25 +++++++++++-------------- dictionaries/CallMap_80_delta.php | 25 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index dddad1e63..9479e14be 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -9874,28 +9874,25 @@ return [ 'PDOException::getTraceAsString' => ['string'], 'PDOStatement::__sleep' => ['list'], 'PDOStatement::__wakeup' => ['void'], -'PDOStatement::bindColumn' => ['bool', 'column'=>'mixed', '&rw_param'=>'mixed', 'type='=>'int', 'maxlen='=>'int', 'driverdata='=>'mixed'], -'PDOStatement::bindParam' => ['bool', 'paramno'=>'mixed', '&rw_param'=>'mixed', 'type='=>'int', 'maxlen='=>'int', 'driverdata='=>'mixed'], -'PDOStatement::bindValue' => ['bool', 'paramno'=>'mixed', 'param'=>'mixed', 'type='=>'int'], +'PDOStatement::bindColumn' => ['bool', 'column'=>'mixed', '&rw_var'=>'mixed', 'type='=>'int', 'maxLength='=>'int', 'driverOptions='=>'mixed'], +'PDOStatement::bindParam' => ['bool', 'param,'=>'string|int', '&rw_var'=>'mixed', 'type='=>'int', 'maxLength='=>'int', 'driverOptions='=>'mixed'], +'PDOStatement::bindValue' => ['bool', 'param'=>'string|int', 'value'=>'mixed', 'type='=>'int'], 'PDOStatement::closeCursor' => ['bool'], 'PDOStatement::columnCount' => ['int'], -'PDOStatement::debugDumpParams' => ['void'], -'PDOStatement::errorCode' => ['string'], +'PDOStatement::debugDumpParams' => ['bool|null'], +'PDOStatement::errorCode' => ['string|null'], 'PDOStatement::errorInfo' => ['array'], -'PDOStatement::execute' => ['bool', 'bound_input_params='=>'?array'], -'PDOStatement::fetch' => ['mixed', 'how='=>'int', 'orientation='=>'int', 'offset='=>'int'], -'PDOStatement::fetchAll' => ['array|false', 'how='=>'int', 'fetch_argument='=>'int|string|callable', 'ctor_args='=>'?array'], -'PDOStatement::fetchColumn' => ['string|int|float|bool|null', 'column_number='=>'int'], -'PDOStatement::fetchObject' => ['object|false', 'class_name='=>'string', 'ctor_args='=>'array'], +'PDOStatement::execute' => ['bool', 'params='=>'?array'], +'PDOStatement::fetch' => ['mixed', 'mode='=>'int', 'cursorOrientation='=>'int', 'cursorOffset='=>'int'], +'PDOStatement::fetchAll' => ['array', 'mode='=>'int', '...args='=>'mixed'], +'PDOStatement::fetchColumn' => ['mixed', 'column='=>'int'], +'PDOStatement::fetchObject' => ['object|false', 'class='=>'?string', 'ctorArgs='=>'?array'], 'PDOStatement::getAttribute' => ['mixed', 'attribute'=>'int'], 'PDOStatement::getColumnMeta' => ['array|false', 'column'=>'int'], 'PDOStatement::nextRowset' => ['bool'], 'PDOStatement::rowCount' => ['int'], 'PDOStatement::setAttribute' => ['bool', 'attribute'=>'int', 'value'=>'mixed'], -'PDOStatement::setFetchMode' => ['bool', 'mode'=>'int'], -'PDOStatement::setFetchMode\'1' => ['bool', 'fetch_column'=>'int', 'colno'=>'int'], -'PDOStatement::setFetchMode\'2' => ['bool', 'fetch_class'=>'int', 'classname'=>'string', 'ctorargs'=>'array'], -'PDOStatement::setFetchMode\'3' => ['bool', 'fetch_into'=>'int', 'object'=>'object'], +'PDOStatement::setFetchMode' => ['bool', 'mode'=>'int', '...args='=> 'mixed'], 'pfsockopen' => ['resource|false', 'hostname'=>'string', 'port='=>'int', '&w_error_code='=>'int', '&w_error_message='=>'string', 'timeout='=>'float'], 'pg_affected_rows' => ['int', 'result'=>'resource'], 'pg_cancel_query' => ['bool', 'connection'=>'resource'], diff --git a/dictionaries/CallMap_80_delta.php b/dictionaries/CallMap_80_delta.php index c3ad12e2c..fa345117b 100644 --- a/dictionaries/CallMap_80_delta.php +++ b/dictionaries/CallMap_80_delta.php @@ -96,6 +96,17 @@ return [ 'mktime' => ['int|false', 'hour'=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'], 'parse_str' => ['void', 'encoded_string'=>'string', '&w_result'=>'array'], 'password_hash' => ['string', 'password'=>'string', 'algo'=>'?string|?int', 'options='=>'array'], +'PDOStatement::bindColumn' => ['bool', 'column'=>'mixed', '&rw_var'=>'mixed', 'type='=>'int', 'maxLength='=>'int', 'driverOptions='=>'mixed'], +'PDOStatement::bindParam' => ['bool', 'param,'=>'string|int', '&rw_var'=>'mixed', 'type='=>'int', 'maxLength='=>'int', 'driverOptions='=>'mixed'], +'PDOStatement::bindValue' => ['bool', 'param'=>'string|int', 'value'=>'mixed', 'type='=>'int'], +'PDOStatement::debugDumpParams' => ['bool|null'], +'PDOStatement::errorCode' => ['string|null'], +'PDOStatement::execute' => ['bool', 'params='=>'?array'], +'PDOStatement::fetch' => ['mixed', 'mode='=>'int', 'cursorOrientation='=>'int', 'cursorOffset='=>'int'], +'PDOStatement::fetchAll' => ['array', 'mode='=>'int', '...args='=>'mixed'], +'PDOStatement::fetchColumn' => ['mixed', 'column='=>'int'], +'PDOStatement::fetchObject' => ['object|false', 'class='=>'?string', 'ctorArgs='=>'?array'], +'PDOStatement::setFetchMode' => ['bool', 'mode'=>'int', '...args='=> 'mixed'], 'PhpToken::getAll' => ['list', 'code'=>'string', 'flags='=>'int'], 'PhpToken::is' => ['bool', 'kind'=>'string|int|string[]|int[]'], 'PhpToken::isIgnorable' => ['bool'], @@ -287,6 +298,20 @@ return [ 'mktime' => ['int|false', 'hour='=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'], 'parse_str' => ['void', 'encoded_string'=>'string', '&w_result='=>'array'], 'password_hash' => ['string|false|null', 'password'=>'string', 'algo'=>'?string|?int', 'options='=>'array'], +'PDOStatement::bindColumn' => ['bool', 'column'=>'mixed', '&rw_param'=>'mixed', 'type='=>'int', 'maxlen='=>'int', 'driverdata='=>'mixed'], +'PDOStatement::bindParam' => ['bool', 'paramno'=>'mixed', '&rw_param'=>'mixed', 'type='=>'int', 'maxlen='=>'int', 'driverdata='=>'mixed'], +'PDOStatement::bindValue' => ['bool', 'paramno'=>'mixed', 'param'=>'mixed', 'type='=>'int'], +'PDOStatement::debugDumpParams' => ['void'], +'PDOStatement::errorCode' => ['string'], +'PDOStatement::execute' => ['bool', 'bound_input_params='=>'?array'], +'PDOStatement::fetch' => ['mixed', 'how='=>'int', 'orientation='=>'int', 'offset='=>'int'], +'PDOStatement::fetchAll' => ['array|false', 'how='=>'int', 'fetch_argument='=>'int|string|callable', 'ctor_args='=>'?array'], +'PDOStatement::fetchColumn' => ['string|int|float|bool|null', 'column_number='=>'int'], +'PDOStatement::fetchObject' => ['object|false', 'class_name='=>'string', 'ctor_args='=>'array'], +'PDOStatement::setFetchMode' => ['bool', 'mode'=>'int'], +'PDOStatement::setFetchMode\'1' => ['bool', 'fetch_column'=>'int', 'colno'=>'int'], +'PDOStatement::setFetchMode\'2' => ['bool', 'fetch_class'=>'int', 'classname'=>'string', 'ctorargs'=>'array'], +'PDOStatement::setFetchMode\'3' => ['bool', 'fetch_into'=>'int', 'object'=>'object'], 'png2wbmp' => ['bool', 'pngname'=>'string', 'wbmpname'=>'string', 'dest_height'=>'int', 'dest_width'=>'int', 'threshold'=>'int'], 'proc_get_status' => ['array|false', 'process'=>'resource'], 'read_exif_data' => ['array', 'filename'=>'string', 'sections_needed='=>'string', 'sub_arrays='=>'bool', 'read_thumbnail='=>'bool'],