Commit 295d73cf authored by Nicolas Le Goff's avatar Nicolas Le Goff Committed by Steve Müller

Take care about MariaDB versioning

parent 49927081
......@@ -127,6 +127,10 @@ abstract class AbstractMySQLDriver implements Driver, ExceptionConverterDriver,
);
}
if (false !== stripos($version, 'mariadb')) {
return $this->getDatabasePlatform();
}
$majorVersion = $versionParts['major'];
$minorVersion = isset($versionParts['minor']) ? $versionParts['minor'] : 0;
$patchVersion = isset($versionParts['patch']) ? $versionParts['patch'] : 0;
......
......@@ -60,6 +60,9 @@ class AbstractMySQLDriverTest extends AbstractDriverTest
array('5.7.0', 'Doctrine\DBAL\Platforms\MySQL57Platform'),
array('5.7.1', 'Doctrine\DBAL\Platforms\MySQL57Platform'),
array('6', 'Doctrine\DBAL\Platforms\MySQL57Platform'),
array('10.0.15-MariaDB-1~wheezy', 'Doctrine\DBAL\Platforms\MySqlPlatform'),
array('10.1.2a-MariaDB-a1~lenny-log', 'Doctrine\DBAL\Platforms\MySqlPlatform'),
array('5.5.40-MariaDB-1~wheezy', 'Doctrine\DBAL\Platforms\MySqlPlatform'),
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment