@@ -32,7 +32,7 @@ abstract class AbstractExtendedPdo extends PDO implements ExtendedPdoInterface
3232 * @var PDO|null
3333 *
3434 */
35- protected ? PDO $ pdo = null ;
35+ protected $ pdo = null ;
3636
3737 /**
3838 *
@@ -41,7 +41,7 @@ abstract class AbstractExtendedPdo extends PDO implements ExtendedPdoInterface
4141 * @var ProfilerInterface
4242 *
4343 */
44- protected ProfilerInterface $ profiler ;
44+ protected $ profiler ;
4545
4646 /**
4747 *
@@ -50,7 +50,7 @@ abstract class AbstractExtendedPdo extends PDO implements ExtendedPdoInterface
5050 * @var ParserInterface
5151 *
5252 */
53- protected ParserInterface $ parser ;
53+ protected $ parser ;
5454
5555 /**
5656 *
@@ -59,7 +59,7 @@ abstract class AbstractExtendedPdo extends PDO implements ExtendedPdoInterface
5959 * @var string
6060 *
6161 */
62- protected string $ quoteNamePrefix = '" ' ;
62+ protected $ quoteNamePrefix = '" ' ;
6363
6464 /**
6565 *
@@ -68,7 +68,7 @@ abstract class AbstractExtendedPdo extends PDO implements ExtendedPdoInterface
6868 * @var string
6969 *
7070 */
71- protected string $ quoteNameSuffix = '" ' ;
71+ protected $ quoteNameSuffix = '" ' ;
7272
7373 /**
7474 *
@@ -77,7 +77,7 @@ abstract class AbstractExtendedPdo extends PDO implements ExtendedPdoInterface
7777 * @var string
7878 *
7979 */
80- protected string $ quoteNameEscapeFind = '" ' ;
80+ protected $ quoteNameEscapeFind = '" ' ;
8181
8282 /**
8383 *
@@ -86,7 +86,7 @@ abstract class AbstractExtendedPdo extends PDO implements ExtendedPdoInterface
8686 * @var string
8787 *
8888 */
89- protected string $ quoteNameEscapeRepl = '"" ' ;
89+ protected $ quoteNameEscapeRepl = '"" ' ;
9090
9191 /**
9292 *
@@ -205,7 +205,8 @@ public function errorInfo(): array
205205 * @see http://php.net/manual/en/pdo.exec.php
206206 *
207207 */
208- public function exec (string $ statement ): int
208+ #[\ReturnTypeWillChange]
209+ public function exec ($ statement )
209210 {
210211 $ this ->connect ();
211212 $ this ->profiler ->start (__FUNCTION__ );
@@ -405,7 +406,7 @@ public function fetchObjects(
405406 * @return array|false
406407 *
407408 */
408- public function fetchOne (string $ statement , array $ values = []): array | false
409+ public function fetchOne (string $ statement , array $ values = [])
409410 {
410411 $ sth = $ this ->perform ($ statement , $ values );
411412 return $ sth ->fetch (self ::FETCH_ASSOC );
@@ -440,7 +441,7 @@ public function fetchPairs(string $statement, array $values = []): array
440441 * @return mixed
441442 *
442443 */
443- public function fetchValue (string $ statement , array $ values = []): mixed
444+ public function fetchValue (string $ statement , array $ values = [])
444445 {
445446 $ sth = $ this ->perform ($ statement , $ values );
446447 return $ sth ->fetchColumn (0 );
@@ -523,7 +524,8 @@ public function isConnected(): bool
523524 *
524525 * @see http://php.net/manual/en/pdo.lastinsertid.php
525526 */
526- public function lastInsertId (?string $ name = null ): string |false
527+ #[\ReturnTypeWillChange]
528+ public function lastInsertId ($ name = null )
527529 {
528530 $ this ->connect ();
529531 $ this ->profiler ->start (__FUNCTION__ );
@@ -564,18 +566,18 @@ public function perform(string $statement, array $values = []): PDOStatement
564566 *
565567 * @param string $query The SQL statement to prepare for execution.
566568 *
567- * @param array $options Set these attributes on the returned
569+ * @param array|null $options Set these attributes on the returned
568570 * PDOStatement.
569571 *
570572 * @return PDOStatement
571573 *
572574 * @see http://php.net/manual/en/pdo.prepare.php
573575 *
574576 */
575- public function prepare (string $ query , array $ options = [] ): PDOStatement
577+ public function prepare ($ query , $ options = null ): PDOStatement
576578 {
577579 $ this ->connect ();
578- $ sth = $ this ->pdo ->prepare ($ query , $ options );
580+ $ sth = $ this ->pdo ->prepare ($ query , $ options ?? [] );
579581 return $ sth ;
580582 }
581583
@@ -634,20 +636,18 @@ public function prepareWithValues(string $statement, array $values = []): PDOSta
634636 *
635637 * @param string $query The SQL statement to prepare and execute.
636638 *
637- * @param int|null $fetchMode
638- *
639- * @param mixed ...$fetch_mode_args Optional fetch-related parameters.
639+ * @param mixed ...$fetch Optional fetch-related parameters.
640640 *
641641 * @return PDOStatement
642642 *
643643 * @see http://php.net/manual/en/pdo.query.php
644644 *
645645 */
646- public function query (string $ query , ? int $ fetchMode = null , mixed ...$ fetch_mode_args ): PDOStatement
646+ public function query (string $ query , ...$ fetch ): PDOStatement
647647 {
648648 $ this ->connect ();
649649 $ this ->profiler ->start (__FUNCTION__ );
650- $ sth = $ this ->pdo ->query ($ query , $ fetchMode , ...$ fetch_mode_args );
650+ $ sth = $ this ->pdo ->query ($ query , ...$ fetch );
651651 $ this ->profiler ->finish ($ sth ->queryString );
652652 return $ sth ;
653653 }
@@ -668,7 +668,7 @@ public function query(string $query, ?int $fetchMode = null, mixed ...$fetch_mod
668668 * @see http://php.net/manual/en/pdo.quote.php
669669 *
670670 */
671- public function quote (string | int | array | float | null $ value , int $ type = self ::PARAM_STR ): string
671+ public function quote ($ value , $ type = self ::PARAM_STR ): string
672672 {
673673 $ this ->connect ();
674674
@@ -908,7 +908,7 @@ public function yieldPairs(string $statement, array $values = []): Generator
908908 * bindable (e.g., array, object, or resource).
909909 *
910910 */
911- protected function bindValue (PDOStatement $ sth , mixed $ key , mixed $ val ): bool
911+ protected function bindValue (PDOStatement $ sth , $ key , $ val ): bool
912912 {
913913 if (is_int ($ val )) {
914914 return $ sth ->bindValue ($ key , $ val , self ::PARAM_INT );
@@ -990,7 +990,8 @@ protected function setQuoteName(string $driver): void
990990 * @param int $attribute
991991 * @return bool|int|string|array|null
992992 */
993- public function getAttribute (int $ attribute ): bool |int |string |array |null
993+ #[\ReturnTypeWillChange]
994+ public function getAttribute ($ attribute )
994995 {
995996 $ this ->connect ();
996997 return $ this ->pdo ->getAttribute ($ attribute );
@@ -1004,7 +1005,8 @@ public function getAttribute(int $attribute): bool|int|string|array|null
10041005 * @param mixed $value
10051006 * @return bool
10061007 */
1007- public function setAttribute (int $ attribute , mixed $ value ): bool
1008+ #[\ReturnTypeWillChange]
1009+ public function setAttribute ($ attribute , $ value )
10081010 {
10091011 $ this ->connect ();
10101012 return $ this ->pdo ->setAttribute ($ attribute , $ value );
0 commit comments