Skip to content

Commit ea96457

Browse files
authored
Merge branch 'vimeo:master' into master
2 parents 40e725c + 3425b60 commit ea96457

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

src/FakePdoStatementTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ public function rowCount() : int
331331
* @param int $cursor_orientation
332332
* @param int $cursor_offset
333333
*/
334+
#[\ReturnTypeWillChange]
334335
public function fetch(
335336
$fetch_style = -123,
336337
$cursor_orientation = \PDO::FETCH_ORI_NEXT,
@@ -391,6 +392,7 @@ public function fetch(
391392
* @param int $column
392393
* @return null|scalar
393394
*/
395+
#[\ReturnTypeWillChange]
394396
public function fetchColumn($column = 0)
395397
{
396398
/** @var array<int, scalar>|false $row */

src/FakePdoTrait.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public function __construct(string $dsn, string $username = '', string $passwd =
6868
$this->server = Server::getOrCreate('primary');
6969
}
7070

71+
#[\ReturnTypeWillChange]
7172
public function setAttribute($key, $value)
7273
{
7374
if ($key === \PDO::ATTR_EMULATE_PREPARES) {
@@ -137,6 +138,7 @@ public function useStrictMode() : bool
137138
return $this->strict_mode;
138139
}
139140

141+
#[\ReturnTypeWillChange]
140142
public function beginTransaction()
141143
{
142144
if (Server::hasSnapshot('transaction')) {
@@ -147,11 +149,13 @@ public function beginTransaction()
147149
return true;
148150
}
149151

152+
#[\ReturnTypeWillChange]
150153
public function commit()
151154
{
152155
return Server::deleteSnapshot('transaction');
153156
}
154157

158+
#[\ReturnTypeWillChange]
155159
public function rollback()
156160
{
157161
if (!Server::hasSnapshot('transaction')) {
@@ -162,6 +166,7 @@ public function rollback()
162166
return true;
163167
}
164168

169+
#[\ReturnTypeWillChange]
165170
public function inTransaction()
166171
{
167172
return Server::hasSnapshot('transaction');
@@ -171,6 +176,7 @@ public function inTransaction()
171176
* @param string $statement
172177
* @return int|false
173178
*/
179+
#[\ReturnTypeWillChange]
174180
public function exec($statement)
175181
{
176182
$statement = trim($statement);
@@ -193,6 +199,7 @@ public function exec($statement)
193199
* @param int $parameter_type
194200
* @return string
195201
*/
202+
#[\ReturnTypeWillChange]
196203
public function quote($string, $parameter_type = \PDO::PARAM_STR)
197204
{
198205
// @see https://github.com/php/php-src/blob/php-8.0.2/ext/mysqlnd/mysqlnd_charset.c#L860-L878

src/Php8/FakePdo.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class FakePdo extends PDO implements FakePdoInterface
1414
* @param array $options
1515
* @return FakePdoStatement
1616
*/
17+
#[\ReturnTypeWillChange]
1718
public function prepare($statement, array $options = [])
1819
{
1920
return new FakePdoStatement($this, $statement, $this->real);
@@ -25,6 +26,7 @@ public function prepare($statement, array $options = [])
2526
* @param mixed ...$fetchModeArgs
2627
* @return FakePdoStatement
2728
*/
29+
#[\ReturnTypeWillChange]
2830
public function query(string $statement, ?int $mode = PDO::ATTR_DEFAULT_FETCH_MODE, mixed ...$fetchModeArgs)
2931
{
3032
$sth = $this->prepare($statement);

src/Php8/FakePdoStatement.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class FakePdoStatement extends \PDOStatement
1010
* @param ?array $params
1111
* @return bool
1212
*/
13+
#[\ReturnTypeWillChange]
1314
public function execute(?array $params = null)
1415
{
1516
return $this->universalExecute($params);
@@ -41,6 +42,7 @@ public function setFetchMode(int $mode, ...$args) : bool
4142
* @param array|null $ctorArgs
4243
* @return false|T
4344
*/
45+
#[\ReturnTypeWillChange]
4446
public function fetchObject(?string $class = \stdClass::class, ?array $ctorArgs = null)
4547
{
4648
return $this->universalFetchObject($class, $ctorArgs);

0 commit comments

Comments
 (0)