-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4347 from derrabus/bugfix/php8-compat
[2.12] PHP 8 compatibility
- Loading branch information
Showing
11 changed files
with
267 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace Doctrine\DBAL\Driver; | ||
|
||
use PDOStatement; | ||
|
||
use function func_get_args; | ||
|
||
use const PHP_VERSION_ID; | ||
|
||
if (PHP_VERSION_ID >= 80000) { | ||
/** | ||
* @internal | ||
*/ | ||
trait PDOQueryImplementation | ||
{ | ||
/** | ||
* @return PDOStatement | ||
*/ | ||
public function query(?string $query = null, ?int $fetchMode = null, mixed ...$fetchModeArgs) | ||
{ | ||
return $this->doQuery($query, $fetchMode, ...$fetchModeArgs); | ||
} | ||
} | ||
} else { | ||
/** | ||
* @internal | ||
*/ | ||
trait PDOQueryImplementation | ||
{ | ||
/** | ||
* @return PDOStatement | ||
*/ | ||
public function query() | ||
{ | ||
return $this->doQuery(...func_get_args()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.