diff --git a/phpBB/phpbb/db/doctrine/case_insensitive_string.php b/phpBB/phpbb/db/doctrine/case_insensitive_string.php index 357776971d..484308fc06 100644 --- a/phpBB/phpbb/db/doctrine/case_insensitive_string.php +++ b/phpBB/phpbb/db/doctrine/case_insensitive_string.php @@ -28,7 +28,7 @@ class case_insensitive_string extends Type */ public function getSQLDeclaration(array $column, AbstractPlatform $platform): string { - if ($platform->getName() === 'postgresql') + if ($platform instanceof postgresql_platform) { return 'varchar_ci'; } @@ -37,7 +37,7 @@ class case_insensitive_string extends Type // we used 3 times larger capacity for strings on oracle for unicode strings // as on other platforms. This is not the case with varchar_ci, which uses // the same length as other platforms. - if ($platform->getName() === 'oracle') + if ($platform instanceof oracle_platform) { return $platform->getAsciiStringTypeDeclarationSQL($column); } diff --git a/phpBB/phpbb/db/doctrine/postgresql_platform.php b/phpBB/phpbb/db/doctrine/postgresql_platform.php index 5ebff66200..d92800b4bd 100644 --- a/phpBB/phpbb/db/doctrine/postgresql_platform.php +++ b/phpBB/phpbb/db/doctrine/postgresql_platform.php @@ -14,7 +14,7 @@ namespace phpbb\db\doctrine; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\PostgreSQL94Platform; +use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use Doctrine\DBAL\Schema\Index; use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Table; @@ -31,7 +31,7 @@ use Doctrine\DBAL\Types\Type; * to stay compatible with the existing DB we have to change its * naming and not ours. */ -class postgresql_platform extends PostgreSQL94Platform +class postgresql_platform extends PostgreSQLPlatform { /** * {@inheritdoc} diff --git a/phpBB/phpbb/db/doctrine/sqlsrv_platform.php b/phpBB/phpbb/db/doctrine/sqlsrv_platform.php index d67612f79a..ca2a9dd7e6 100644 --- a/phpBB/phpbb/db/doctrine/sqlsrv_platform.php +++ b/phpBB/phpbb/db/doctrine/sqlsrv_platform.php @@ -13,14 +13,14 @@ namespace phpbb\db\doctrine; -use Doctrine\DBAL\Platforms\SQLServer2012Platform; +use Doctrine\DBAL\Platforms\SQLServerPlatform; use Doctrine\DBAL\Schema\Identifier; use Doctrine\DBAL\Schema\TableDiff; /** * SQLServer specific schema restrictions for BC. */ -class sqlsrv_platform extends SQLServer2012Platform +class sqlsrv_platform extends SQLServerPlatform { /** * {@inheritDoc}