From 494df025916341342fa07b5a900412cd76e41d5a Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 14 Nov 2023 10:05:33 +0100 Subject: [PATCH] Relax return types of getExceptionConverter() implementations --- src/Driver/AbstractDB2Driver.php | 3 ++- src/Driver/AbstractMySQLDriver.php | 3 ++- src/Driver/AbstractOracleDriver.php | 3 ++- src/Driver/AbstractPostgreSQLDriver.php | 3 ++- src/Driver/AbstractSQLServerDriver.php | 3 ++- src/Driver/AbstractSQLiteDriver.php | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Driver/AbstractDB2Driver.php b/src/Driver/AbstractDB2Driver.php index 5ec8c000798..9955a383640 100644 --- a/src/Driver/AbstractDB2Driver.php +++ b/src/Driver/AbstractDB2Driver.php @@ -5,6 +5,7 @@ namespace Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Driver\API\ExceptionConverter as ExceptionConverterInterface; use Doctrine\DBAL\Driver\API\IBMDB2\ExceptionConverter; use Doctrine\DBAL\Platforms\DB2Platform; use Doctrine\DBAL\ServerVersionProvider; @@ -19,7 +20,7 @@ public function getDatabasePlatform(ServerVersionProvider $versionProvider): DB2 return new DB2Platform(); } - public function getExceptionConverter(): ExceptionConverter + public function getExceptionConverter(): ExceptionConverterInterface { return new ExceptionConverter(); } diff --git a/src/Driver/AbstractMySQLDriver.php b/src/Driver/AbstractMySQLDriver.php index 8d81b6c0e16..40d65076393 100644 --- a/src/Driver/AbstractMySQLDriver.php +++ b/src/Driver/AbstractMySQLDriver.php @@ -5,6 +5,7 @@ namespace Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Driver\API\ExceptionConverter as ExceptionConverterInterface; use Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter; use Doctrine\DBAL\Platforms\AbstractMySQLPlatform; use Doctrine\DBAL\Platforms\Exception\InvalidPlatformVersion; @@ -52,7 +53,7 @@ public function getDatabasePlatform(ServerVersionProvider $versionProvider): Abs return new MySQLPlatform(); } - public function getExceptionConverter(): ExceptionConverter + public function getExceptionConverter(): ExceptionConverterInterface { return new ExceptionConverter(); } diff --git a/src/Driver/AbstractOracleDriver.php b/src/Driver/AbstractOracleDriver.php index 847cfee52a2..cf56cfad6c8 100644 --- a/src/Driver/AbstractOracleDriver.php +++ b/src/Driver/AbstractOracleDriver.php @@ -6,6 +6,7 @@ use Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver\AbstractOracleDriver\EasyConnectString; +use Doctrine\DBAL\Driver\API\ExceptionConverter as ExceptionConverterInterface; use Doctrine\DBAL\Driver\API\OCI\ExceptionConverter; use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\ServerVersionProvider; @@ -20,7 +21,7 @@ public function getDatabasePlatform(ServerVersionProvider $versionProvider): Ora return new OraclePlatform(); } - public function getExceptionConverter(): ExceptionConverter + public function getExceptionConverter(): ExceptionConverterInterface { return new ExceptionConverter(); } diff --git a/src/Driver/AbstractPostgreSQLDriver.php b/src/Driver/AbstractPostgreSQLDriver.php index 4b77526a014..2efcddca790 100644 --- a/src/Driver/AbstractPostgreSQLDriver.php +++ b/src/Driver/AbstractPostgreSQLDriver.php @@ -5,6 +5,7 @@ namespace Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Driver\API\ExceptionConverter as ExceptionConverterInterface; use Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use Doctrine\DBAL\ServerVersionProvider; @@ -19,7 +20,7 @@ public function getDatabasePlatform(ServerVersionProvider $versionProvider): Pos return new PostgreSQLPlatform(); } - public function getExceptionConverter(): ExceptionConverter + public function getExceptionConverter(): ExceptionConverterInterface { return new ExceptionConverter(); } diff --git a/src/Driver/AbstractSQLServerDriver.php b/src/Driver/AbstractSQLServerDriver.php index d4e3dd7f214..8c2d012fe19 100644 --- a/src/Driver/AbstractSQLServerDriver.php +++ b/src/Driver/AbstractSQLServerDriver.php @@ -5,6 +5,7 @@ namespace Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Driver\API\ExceptionConverter as ExceptionConverterInterface; use Doctrine\DBAL\Driver\API\SQLSrv\ExceptionConverter; use Doctrine\DBAL\Platforms\SQLServerPlatform; use Doctrine\DBAL\ServerVersionProvider; @@ -19,7 +20,7 @@ public function getDatabasePlatform(ServerVersionProvider $versionProvider): SQL return new SQLServerPlatform(); } - public function getExceptionConverter(): ExceptionConverter + public function getExceptionConverter(): ExceptionConverterInterface { return new ExceptionConverter(); } diff --git a/src/Driver/AbstractSQLiteDriver.php b/src/Driver/AbstractSQLiteDriver.php index 4e319d56a08..74a2b12b4b8 100644 --- a/src/Driver/AbstractSQLiteDriver.php +++ b/src/Driver/AbstractSQLiteDriver.php @@ -5,6 +5,7 @@ namespace Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Driver\API\ExceptionConverter as ExceptionConverterInterface; use Doctrine\DBAL\Driver\API\SQLite\ExceptionConverter; use Doctrine\DBAL\Platforms\SQLitePlatform; use Doctrine\DBAL\ServerVersionProvider; @@ -19,7 +20,7 @@ public function getDatabasePlatform(ServerVersionProvider $versionProvider): SQL return new SQLitePlatform(); } - public function getExceptionConverter(): ExceptionConverter + public function getExceptionConverter(): ExceptionConverterInterface { return new ExceptionConverter(); }