Skip to content

Commit

Permalink
Forward compatibility for MySQL-like platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Dec 7, 2021
1 parent cb080ac commit dfdb5fb
Show file tree
Hide file tree
Showing 19 changed files with 1,244 additions and 1,217 deletions.
4 changes: 2 additions & 2 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@
<file name="src/Connection.php"/>
<file name="src/Driver/IBMDB2/Statement.php"/>
<file name="src/DriverManager.php"/>
<file name="src/Platforms/AbstractMySQLPlatform.php"/>
<file name="src/Platforms/AbstractPlatform.php"/>
<file name="src/Platforms/MySQLPlatform.php"/>
<file name="src/Platforms/SQLServerPlatform.php"/>
<file name="src/Platforms/SqlitePlatform.php"/>
<file name="src/Schema/Column.php"/>
Expand Down Expand Up @@ -388,7 +388,7 @@
Fixing these issues requires support of union types at the language level
or breaking API changes.
-->
<file name="src/Platforms/MySQLPlatform.php"/>
<file name="src/Platforms/AbstractMySQLPlatform.php"/>
<file name="tests/Functional/Driver/AbstractDriverTest.php"/>
</errorLevel>
</RedundantConditionGivenDocblockType>
Expand Down
5 changes: 3 additions & 2 deletions src/Driver/AbstractMySQLDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Doctrine\DBAL\Driver\API\ExceptionConverter;
use Doctrine\DBAL\Driver\API\MySQL;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
use Doctrine\DBAL\Platforms\MySQL57Platform;
Expand Down Expand Up @@ -121,7 +122,7 @@ private function getMariaDbMysqlVersionNumber(string $versionString): string
/**
* {@inheritdoc}
*
* @return MySQLPlatform
* @return AbstractMySQLPlatform
*/
public function getDatabasePlatform()
{
Expand All @@ -135,7 +136,7 @@ public function getDatabasePlatform()
*/
public function getSchemaManager(Connection $conn, AbstractPlatform $platform)
{
assert($platform instanceof MySQLPlatform);
assert($platform instanceof AbstractMySQLPlatform);

return new MySQLSchemaManager($conn, $platform);
}
Expand Down

0 comments on commit dfdb5fb

Please sign in to comment.