Skip to content

Commit

Permalink
Remove keywords lists
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Nov 11, 2024
1 parent c221326 commit 5a3fa90
Show file tree
Hide file tree
Showing 23 changed files with 0 additions and 1,789 deletions.
5 changes: 0 additions & 5 deletions src/Driver/AbstractMySQLDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Doctrine\DBAL\Platforms\MariaDB1010Platform;
use Doctrine\DBAL\Platforms\MariaDB1060Platform;
use Doctrine\DBAL\Platforms\MariaDBPlatform;
use Doctrine\DBAL\Platforms\MySQL84Platform;
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\ServerVersionProvider;

Expand Down Expand Up @@ -46,10 +45,6 @@ public function getDatabasePlatform(ServerVersionProvider $versionProvider): Abs
return new MariaDBPlatform();
}

if (version_compare($version, '8.4.0', '>=')) {
return new MySQL84Platform();
}

return new MySQLPlatform();
}

Expand Down
7 changes: 0 additions & 7 deletions src/Platforms/AbstractMySQLPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Exception\InvalidColumnType\ColumnValuesRequired;
use Doctrine\DBAL\Platforms\Keywords\KeywordList;
use Doctrine\DBAL\Platforms\Keywords\MySQLKeywords;
use Doctrine\DBAL\Schema\AbstractAsset;
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\Index;
Expand Down Expand Up @@ -756,11 +754,6 @@ protected function initializeDoctrineTypeMappings(): void
];
}

protected function createReservedKeywordsList(): KeywordList
{
return new MySQLKeywords();
}

/**
* {@inheritDoc}
*
Expand Down
20 changes: 0 additions & 20 deletions src/Platforms/AbstractPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Doctrine\DBAL\LockMode;
use Doctrine\DBAL\Platforms\Exception\NoColumnsSpecifiedForTable;
use Doctrine\DBAL\Platforms\Exception\NotSupported;
use Doctrine\DBAL\Platforms\Keywords\KeywordList;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
Expand Down Expand Up @@ -76,11 +75,6 @@ abstract class AbstractPlatform
/** @var string[]|null */
protected ?array $doctrineTypeMapping = null;

/**
* Holds the KeywordList instance for the current platform.
*/
protected ?KeywordList $_keywords = null;

/**
* Returns the SQL snippet that declares a boolean column.
*
Expand Down Expand Up @@ -2162,20 +2156,6 @@ public function rollbackSavePoint(string $savepoint): string
return 'ROLLBACK TO SAVEPOINT ' . $savepoint;
}

/**
* Returns the keyword list instance of this platform.
*/
final public function getReservedKeywordsList(): KeywordList
{
// Store the instance so it doesn't need to be generated on every request.
return $this->_keywords ??= $this->createReservedKeywordsList();
}

/**
* Creates an instance of the reserved keyword list of this platform.
*/
abstract protected function createReservedKeywordsList(): KeywordList;

/**
* Quotes a literal string.
* This method is NOT meant to fix SQL injections!
Expand Down
7 changes: 0 additions & 7 deletions src/Platforms/DB2Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Platforms\Exception\NotSupported;
use Doctrine\DBAL\Platforms\Keywords\DB2Keywords;
use Doctrine\DBAL\Platforms\Keywords\KeywordList;
use Doctrine\DBAL\Schema\ColumnDiff;
use Doctrine\DBAL\Schema\DB2SchemaManager;
use Doctrine\DBAL\Schema\Identifier;
Expand Down Expand Up @@ -591,11 +589,6 @@ public function supportsSavepoints(): bool
return false;
}

protected function createReservedKeywordsList(): KeywordList
{
return new DB2Keywords();
}

public function createSchemaManager(Connection $connection): DB2SchemaManager
{
return new DB2SchemaManager($connection, $this);
Expand Down
Loading

0 comments on commit 5a3fa90

Please sign in to comment.