Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
065386d8
Unverified
Commit
065386d8
authored
Oct 13, 2017
by
belgattitude
Committed by
Luís Cobucci
Nov 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
morozov review: revert to MariaDb1027Platform name
parent
e3bec40a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
18 deletions
+18
-18
AbstractMySQLDriver.php
lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
+3
-3
MariaDb1027Platform.php
lib/Doctrine/DBAL/Platforms/MariaDb1027Platform.php
+1
-1
MySqlSchemaManager.php
lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
+3
-3
AbstractMySQLDriverTest.php
tests/Doctrine/Tests/DBAL/Driver/AbstractMySQLDriverTest.php
+4
-4
MySqlSchemaManagerTest.php
...e/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php
+4
-4
MariaDb1027PlatformTest.php
...Doctrine/Tests/DBAL/Platforms/MariaDb1027PlatformTest.php
+3
-3
No files found.
lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
View file @
065386d8
...
...
@@ -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\MariaDb102
7
Platform
;
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|MariaDb102
7
Platform|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
MariaDb102
7
Platform
();
}
if
(
false
===
stripos
(
$version
,
'mariadb'
)
...
...
lib/Doctrine/DBAL/Platforms/MariaDb102Platform.php
→
lib/Doctrine/DBAL/Platforms/MariaDb102
7
Platform.php
View file @
065386d8
...
...
@@ -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
MariaDb102
7
Platform
extends
MySqlPlatform
{
/**
* {@inheritdoc}
...
...
lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
View file @
065386d8
...
...
@@ -19,7 +19,7 @@
namespace
Doctrine\DBAL\Schema
;
use
Doctrine\DBAL\Platforms\MariaDb102Platform
;
use
Doctrine\DBAL\Platforms\MariaDb102
7
Platform
;
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
MariaDb102
7
Platform
)
{
$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
(
MariaDb102
7
Platform
$platform
,
?
string
$columnDefault
)
:
?
string
{
if
(
$columnDefault
===
'NULL'
||
$columnDefault
===
null
)
{
return
null
;
...
...
tests/Doctrine/Tests/DBAL/Driver/AbstractMySQLDriverTest.php
View file @
065386d8
...
...
@@ -3,7 +3,7 @@
namespace
Doctrine\Tests\DBAL\Driver
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Platforms\MariaDb102Platform
;
use
Doctrine\DBAL\Platforms\MariaDb102
7
Platform
;
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'
,
MariaDb102
7
Platform
::
class
),
array
(
'10.2.8-MariaDB-10.2.8+maria~xenial-log'
,
MariaDb102
7
Platform
::
class
),
array
(
'10.2.8-MariaDB-1~lenny-log'
,
MariaDb102
7
Platform
::
class
)
);
}
...
...
tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php
View file @
065386d8
...
...
@@ -2,7 +2,7 @@
namespace
Doctrine\Tests\DBAL\Functional\Schema
;
use
Doctrine\DBAL\Platforms\MariaDb102Platform
;
use
Doctrine\DBAL\Platforms\MariaDb102
7
Platform
;
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
MariaDb102
7
Platform
)
{
$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
MariaDb102
7
Platform
)
{
$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
MariaDb102
7
Platform
)
{
$this
->
markTestSkipped
(
'Only relevant for MariaDb102Platform.'
);
}
...
...
tests/Doctrine/Tests/DBAL/Platforms/MariaDb102PlatformTest.php
→
tests/Doctrine/Tests/DBAL/Platforms/MariaDb102
7
PlatformTest.php
View file @
065386d8
...
...
@@ -2,19 +2,19 @@
namespace
Doctrine\Tests\DBAL\Platforms
;
use
Doctrine\DBAL\Platforms\MariaDb102Platform
;
use
Doctrine\DBAL\Platforms\MariaDb102
7
Platform
;
use
Doctrine\DBAL\Schema\Comparator
;
use
Doctrine\DBAL\Schema\Table
;
use
Doctrine\DBAL\Types\Type
;
class
MariaDb102PlatformTest
extends
AbstractMySQLPlatformTestCase
class
MariaDb102
7
PlatformTest
extends
AbstractMySQLPlatformTestCase
{
/**
* {@inheritdoc}
*/
public
function
createPlatform
()
{
return
new
MariaDb102Platform
();
return
new
MariaDb102
7
Platform
();
}
public
function
testHasNativeJsonType
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment