1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-01 03:54:56 +02:00

[ticket/16741] Replace deprecated functions

PHPBB3-16741
This commit is contained in:
Marc Alexander 2022-01-17 17:08:42 +01:00
parent 78528d2b32
commit 5e6065ff9e
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
3 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@ class case_insensitive_string extends Type
*/ */
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{ {
if ($platform->getName() === 'postgresql') if ($platform instanceof postgresql_platform)
{ {
return 'varchar_ci'; 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 // 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 // as on other platforms. This is not the case with varchar_ci, which uses
// the same length as other platforms. // the same length as other platforms.
if ($platform->getName() === 'oracle') if ($platform instanceof oracle_platform)
{ {
return $platform->getAsciiStringTypeDeclarationSQL($column); return $platform->getAsciiStringTypeDeclarationSQL($column);
} }

View File

@ -14,7 +14,7 @@
namespace phpbb\db\doctrine; namespace phpbb\db\doctrine;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Schema\Index; use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\Table; 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 * to stay compatible with the existing DB we have to change its
* naming and not ours. * naming and not ours.
*/ */
class postgresql_platform extends PostgreSQL94Platform class postgresql_platform extends PostgreSQLPlatform
{ {
/** /**
* {@inheritdoc} * {@inheritdoc}

View File

@ -13,14 +13,14 @@
namespace phpbb\db\doctrine; namespace phpbb\db\doctrine;
use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Platforms\SQLServerPlatform;
use Doctrine\DBAL\Schema\Identifier; use Doctrine\DBAL\Schema\Identifier;
use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Schema\TableDiff;
/** /**
* SQLServer specific schema restrictions for BC. * SQLServer specific schema restrictions for BC.
*/ */
class sqlsrv_platform extends SQLServer2012Platform class sqlsrv_platform extends SQLServerPlatform
{ {
/** /**
* {@inheritDoc} * {@inheritDoc}