Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward compatibility for MySQL-like platforms #5098

Merged
merged 1 commit into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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