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