Unverified Commit 065386d8 authored by belgattitude's avatar belgattitude Committed by Luís Cobucci

morozov review: revert to MariaDb1027Platform name

parent e3bec40a
......@@ -23,7 +23,7 @@ use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\MariaDb102Platform;
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
use Doctrine\DBAL\Platforms\MySQL57Platform;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
......@@ -127,14 +127,14 @@ abstract class AbstractMySQLDriver implements Driver, ExceptionConverterDriver,
/**
* {@inheritdoc}
*
* @return AbstractPlatform|MariaDb102Platform|MySQL57Platform|MySqlPlatform
* @return AbstractPlatform|MariaDb1027Platform|MySQL57Platform|MySqlPlatform
* @throws DBALException
*/
public function createDatabasePlatformForVersion($version)
{
if (false !== stripos($version, 'mariadb')
&& version_compare($this->getMariaDbMysqlVersionNumber($version), '10.2.7', '>=')) {
return new MariaDb102Platform();
return new MariaDb1027Platform();
}
if (false === stripos($version, 'mariadb')
......
......@@ -29,7 +29,7 @@ use Doctrine\DBAL\Types\Type;
* @author Vanvelthem Sébastien
* @link www.doctrine-project.org
*/
final class MariaDb102Platform extends MySqlPlatform
final class MariaDb1027Platform extends MySqlPlatform
{
/**
* {@inheritdoc}
......
......@@ -19,7 +19,7 @@
namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Platforms\MariaDb102Platform;
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Types\Type;
......@@ -177,7 +177,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
break;
}
if ($this->_platform instanceof MariaDb102Platform) {
if ($this->_platform instanceof MariaDb1027Platform) {
$columnDefault = $this->getMariaDb1027ColumnDefault($this->_platform, $tableColumn['default']);
} else {
$columnDefault = (isset($tableColumn['default'])) ? $tableColumn['default'] : null;
......@@ -232,7 +232,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
*
* @param null|string $columnDefault default value as stored in information_schema for MariaDB >= 10.2.7
*/
private function getMariaDb1027ColumnDefault(MariaDb102Platform $platform, ?string $columnDefault) : ?string {
private function getMariaDb1027ColumnDefault(MariaDb1027Platform $platform, ?string $columnDefault) : ?string {
if ($columnDefault === 'NULL' || $columnDefault === null) {
return null;
......
......@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Driver;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Platforms\MariaDb102Platform;
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
use Doctrine\DBAL\Platforms\MySQL57Platform;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Schema\MySqlSchemaManager;
......@@ -69,9 +69,9 @@ class AbstractMySQLDriverTest extends AbstractDriverTest
array('10.1.2a-MariaDB-a1~lenny-log', MySqlPlatform::class),
array('5.5.40-MariaDB-1~wheezy', MySqlPlatform::class),
array('5.5.40-MariaDB-1~wheezy', MySqlPlatform::class),
array('5.5.5-MariaDB-10.2.8+maria~xenial-log', MariaDb102Platform::class),
array('10.2.8-MariaDB-10.2.8+maria~xenial-log', MariaDb102Platform::class),
array('10.2.8-MariaDB-1~lenny-log', MariaDb102Platform::class)
array('5.5.5-MariaDB-10.2.8+maria~xenial-log', MariaDb1027Platform::class),
array('10.2.8-MariaDB-10.2.8+maria~xenial-log', MariaDb1027Platform::class),
array('10.2.8-MariaDB-1~lenny-log', MariaDb1027Platform::class)
);
}
......
......@@ -2,7 +2,7 @@
namespace Doctrine\Tests\DBAL\Functional\Schema;
use Doctrine\DBAL\Platforms\MariaDb102Platform;
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Schema;
......@@ -158,7 +158,7 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
*/
public function testDoesNotPropagateDefaultValuesForUnsupportedColumnTypes()
{
if ($this->_sm->getDatabasePlatform() instanceof MariaDb102Platform) {
if ($this->_sm->getDatabasePlatform() instanceof MariaDb1027Platform) {
$this->markTestSkipped('MariaDb102Platform supports default values for BLOB and TEXT columns and will propagate values');
}
......@@ -509,7 +509,7 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
*/
public function testColumnDefaultValuesCurrentTimeAndDate() : void
{
if (!$this->_sm->getDatabasePlatform() instanceof MariaDb102Platform) {
if (!$this->_sm->getDatabasePlatform() instanceof MariaDb1027Platform) {
$this->markTestSkipped('Only relevant for MariaDb102Platform.');
}
......@@ -546,7 +546,7 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
*/
public function testDoesPropagateDefaultValuesForBlobTextAndJson() : void
{
if (!$this->_sm->getDatabasePlatform() instanceof MariaDb102Platform) {
if (!$this->_sm->getDatabasePlatform() instanceof MariaDb1027Platform) {
$this->markTestSkipped('Only relevant for MariaDb102Platform.');
}
......
......@@ -2,19 +2,19 @@
namespace Doctrine\Tests\DBAL\Platforms;
use Doctrine\DBAL\Platforms\MariaDb102Platform;
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Types\Type;
class MariaDb102PlatformTest extends AbstractMySQLPlatformTestCase
class MariaDb1027PlatformTest extends AbstractMySQLPlatformTestCase
{
/**
* {@inheritdoc}
*/
public function createPlatform()
{
return new MariaDb102Platform();
return new MariaDb1027Platform();
}
public function testHasNativeJsonType()
......
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