Skip to content

Commit 0eb9a28

Browse files
committed
Fix PDO parameters.
1 parent 9428e16 commit 0eb9a28

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

ext/pdo/pdo_dbh.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class PDO
66
{
7-
public function __construct(string $dsn, ?string $username = null, ?string $passwd = null, ?array $options = null) {}
7+
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null) {}
88

99
/** @return bool */
1010
public function beginTransaction() {}
@@ -40,7 +40,7 @@ public function prepare(string $statement, array $driver_options = []) {}
4040
public function query(string $statement, ?int $fetch_mode = null, mixed ...$fetch_mode_args) {}
4141

4242
/** @return string|false */
43-
public function quote(string $string, int $parameter_type = PDO::PARAM_STR) {}
43+
public function quote(string $string, int $param_type = PDO::PARAM_STR) {}
4444

4545
/** @return bool */
4646
public function rollBack() {}
@@ -49,5 +49,5 @@ public function rollBack() {}
4949
* @param array|int $value
5050
* @return bool
5151
*/
52-
public function setAttribute(int $attribute, $value) {}
52+
public function setAttribute(int $name, $value) {}
5353
}

ext/pdo/pdo_dbh_arginfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 0c7acc78768ad1fb77a09a24ebd4d4e660b350c9 */
2+
* Stub hash: 6d1adf03e0d677714e5fc715a0d918c4ac2ffa98 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, dsn, IS_STRING, 0)
66
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, username, IS_STRING, 1, "null")
7-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, passwd, IS_STRING, 1, "null")
7+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
88
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null")
99
ZEND_END_ARG_INFO()
1010

@@ -46,13 +46,13 @@ ZEND_END_ARG_INFO()
4646

4747
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_quote, 0, 0, 1)
4848
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
49-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameter_type, IS_LONG, 0, "PDO::PARAM_STR")
49+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, param_type, IS_LONG, 0, "PDO::PARAM_STR")
5050
ZEND_END_ARG_INFO()
5151

5252
#define arginfo_class_PDO_rollBack arginfo_class_PDO_beginTransaction
5353

5454
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO_setAttribute, 0, 0, 2)
55-
ZEND_ARG_TYPE_INFO(0, attribute, IS_LONG, 0)
55+
ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0)
5656
ZEND_ARG_INFO(0, value)
5757
ZEND_END_ARG_INFO()
5858

ext/pdo/pdo_stmt.stub.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
class PDOStatement implements IteratorAggregate
66
{
77
/** @return bool */
8-
public function bindColumn(string|int $column, mixed &$param, int $type = 0, int $maxlen = 0, mixed $driverdata = null) {}
8+
public function bindColumn(string|int $column, mixed &$param, int $type = 0, int $max_length = 0, mixed $driver_options = null) {}
99

1010
/** @return bool */
11-
public function bindParam(string|int $parameter, mixed &$param, int $type = PDO::PARAM_STR, int $maxlen = 0, mixed $driverdata = null) {}
11+
public function bindParam(string|int $param, mixed &$bind_var, int $type = PDO::PARAM_STR, int $max_length = 0, mixed $driver_options = null) {}
1212

1313
/** @return bool */
14-
public function bindValue(string|int $parameter, mixed $value, int $type = PDO::PARAM_STR) {}
14+
public function bindValue(string|int $param, mixed $value, int $type = PDO::PARAM_STR) {}
1515

1616
/** @return bool */
1717
public function closeCursor() {}
@@ -32,19 +32,19 @@ public function errorInfo() {}
3232
public function execute(?array $input_parameters = null) {}
3333

3434
/** @return mixed */
35-
public function fetch(int $fetch_style = PDO::FETCH_BOTH, int $cursor_orientation = PDO::FETCH_ORI_NEXT, int $cursor_offset = 0) {}
35+
public function fetch(int $mode = PDO::FETCH_BOTH, int $cursor_orientation = PDO::FETCH_ORI_NEXT, int $cursor_offset = 0) {}
3636

3737
/** @return array|false */
38-
public function fetchAll(int $fetch_style = PDO::FETCH_BOTH, mixed ...$fetch_args) {}
38+
public function fetchAll(int $mode = PDO::FETCH_BOTH, mixed ...$fetch_args) {}
3939

4040
/** @return mixed */
4141
public function fetchColumn(int $column_number = 0) {}
4242

4343
/** @return mixed */
44-
public function fetchObject(?string $class_name = "stdClass", ?array $ctor_args = null) {}
44+
public function fetchObject(?string $class = "stdClass", ?array $args = null) {}
4545

4646
/** @return mixed */
47-
public function getAttribute(int $attribute) {}
47+
public function getAttribute(int $name) {}
4848

4949
/** @return array|false */
5050
public function getColumnMeta(int $column) {}

ext/pdo/pdo_stmt_arginfo.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: a35e66ccff5e569f07ae8372e661e005943dfbc7 */
2+
* Stub hash: 449825beb161d03b3349c821b6b0f9d31cfd1817 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindColumn, 0, 0, 2)
55
ZEND_ARG_TYPE_MASK(0, column, MAY_BE_STRING|MAY_BE_LONG, NULL)
66
ZEND_ARG_TYPE_INFO(1, param, IS_MIXED, 0)
77
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "0")
8-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlen, IS_LONG, 0, "0")
9-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driverdata, IS_MIXED, 0, "null")
8+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 0, "0")
9+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driver_options, IS_MIXED, 0, "null")
1010
ZEND_END_ARG_INFO()
1111

1212
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindParam, 0, 0, 2)
13-
ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_STRING|MAY_BE_LONG, NULL)
14-
ZEND_ARG_TYPE_INFO(1, param, IS_MIXED, 0)
13+
ZEND_ARG_TYPE_MASK(0, param, MAY_BE_STRING|MAY_BE_LONG, NULL)
14+
ZEND_ARG_TYPE_INFO(1, bind_var, IS_MIXED, 0)
1515
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "PDO::PARAM_STR")
16-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxlen, IS_LONG, 0, "0")
17-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driverdata, IS_MIXED, 0, "null")
16+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_length, IS_LONG, 0, "0")
17+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, driver_options, IS_MIXED, 0, "null")
1818
ZEND_END_ARG_INFO()
1919

2020
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_bindValue, 0, 0, 2)
21-
ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_STRING|MAY_BE_LONG, NULL)
21+
ZEND_ARG_TYPE_MASK(0, param, MAY_BE_STRING|MAY_BE_LONG, NULL)
2222
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
2323
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "PDO::PARAM_STR")
2424
ZEND_END_ARG_INFO()
@@ -39,13 +39,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_execute, 0, 0, 0)
3939
ZEND_END_ARG_INFO()
4040

4141
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetch, 0, 0, 0)
42-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_style, IS_LONG, 0, "PDO::FETCH_BOTH")
42+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PDO::FETCH_BOTH")
4343
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cursor_orientation, IS_LONG, 0, "PDO::FETCH_ORI_NEXT")
4444
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cursor_offset, IS_LONG, 0, "0")
4545
ZEND_END_ARG_INFO()
4646

4747
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchAll, 0, 0, 0)
48-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fetch_style, IS_LONG, 0, "PDO::FETCH_BOTH")
48+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PDO::FETCH_BOTH")
4949
ZEND_ARG_VARIADIC_TYPE_INFO(0, fetch_args, IS_MIXED, 0)
5050
ZEND_END_ARG_INFO()
5151

@@ -54,12 +54,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchColumn, 0, 0, 0)
5454
ZEND_END_ARG_INFO()
5555

5656
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_fetchObject, 0, 0, 0)
57-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "\"stdClass\"")
58-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ctor_args, IS_ARRAY, 1, "null")
57+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 1, "\"stdClass\"")
58+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, args, IS_ARRAY, 1, "null")
5959
ZEND_END_ARG_INFO()
6060

6161
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_getAttribute, 0, 0, 1)
62-
ZEND_ARG_TYPE_INFO(0, attribute, IS_LONG, 0)
62+
ZEND_ARG_TYPE_INFO(0, name, IS_LONG, 0)
6363
ZEND_END_ARG_INFO()
6464

6565
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDOStatement_getColumnMeta, 0, 0, 1)

0 commit comments

Comments
 (0)