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
31d01283
Unverified
Commit
31d01283
authored
Jul 19, 2017
by
Luís Cobucci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop using json_array type on the mapping
Since it was deprecated.
parent
50ddb041
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
6 deletions
+16
-6
MySQL57Platform.php
lib/Doctrine/DBAL/Platforms/MySQL57Platform.php
+2
-1
PostgreSQL92Platform.php
lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php
+4
-1
PostgreSQL94Platform.php
lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php
+4
-1
MySQL57PlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/MySQL57PlatformTest.php
+2
-1
PostgreSQL92PlatformTest.php
...octrine/Tests/DBAL/Platforms/PostgreSQL92PlatformTest.php
+2
-1
PostgreSQL94PlatformTest.php
...octrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php
+2
-1
No files found.
lib/Doctrine/DBAL/Platforms/MySQL57Platform.php
View file @
31d01283
...
@@ -21,6 +21,7 @@ namespace Doctrine\DBAL\Platforms;
...
@@ -21,6 +21,7 @@ namespace Doctrine\DBAL\Platforms;
use
Doctrine\DBAL\Schema\Index
;
use
Doctrine\DBAL\Schema\Index
;
use
Doctrine\DBAL\Schema\TableDiff
;
use
Doctrine\DBAL\Schema\TableDiff
;
use
Doctrine\DBAL\Types\Type
;
/**
/**
* Provides the behavior, features and SQL dialect of the MySQL 5.7 (5.7.9 GA) database platform.
* Provides the behavior, features and SQL dialect of the MySQL 5.7 (5.7.9 GA) database platform.
...
@@ -89,6 +90,6 @@ class MySQL57Platform extends MySqlPlatform
...
@@ -89,6 +90,6 @@ class MySQL57Platform extends MySqlPlatform
{
{
parent
::
initializeDoctrineTypeMappings
();
parent
::
initializeDoctrineTypeMappings
();
$this
->
doctrineTypeMapping
[
'json'
]
=
'json_array'
;
$this
->
doctrineTypeMapping
[
'json'
]
=
Type
::
JSON
;
}
}
}
}
lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php
View file @
31d01283
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
namespace
Doctrine\DBAL\Platforms
;
namespace
Doctrine\DBAL\Platforms
;
use
Doctrine\DBAL\Types\Type
;
/**
/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.2 database platform.
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.2 database platform.
*
*
...
@@ -70,7 +72,8 @@ class PostgreSQL92Platform extends PostgreSQL91Platform
...
@@ -70,7 +72,8 @@ class PostgreSQL92Platform extends PostgreSQL91Platform
protected
function
initializeDoctrineTypeMappings
()
protected
function
initializeDoctrineTypeMappings
()
{
{
parent
::
initializeDoctrineTypeMappings
();
parent
::
initializeDoctrineTypeMappings
();
$this
->
doctrineTypeMapping
[
'json'
]
=
'json_array'
;
$this
->
doctrineTypeMapping
[
'json'
]
=
Type
::
JSON
;
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php
View file @
31d01283
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
namespace
Doctrine\DBAL\Platforms
;
namespace
Doctrine\DBAL\Platforms
;
use
Doctrine\DBAL\Types\Type
;
/**
/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.4 database platform.
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.4 database platform.
*
*
...
@@ -54,6 +56,7 @@ class PostgreSQL94Platform extends PostgreSQL92Platform
...
@@ -54,6 +56,7 @@ class PostgreSQL94Platform extends PostgreSQL92Platform
protected
function
initializeDoctrineTypeMappings
()
protected
function
initializeDoctrineTypeMappings
()
{
{
parent
::
initializeDoctrineTypeMappings
();
parent
::
initializeDoctrineTypeMappings
();
$this
->
doctrineTypeMapping
[
'jsonb'
]
=
'json_array'
;
$this
->
doctrineTypeMapping
[
'jsonb'
]
=
Type
::
JSON
;
}
}
}
}
tests/Doctrine/Tests/DBAL/Platforms/MySQL57PlatformTest.php
View file @
31d01283
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
Doctrine\Tests\DBAL\Platforms
;
namespace
Doctrine\Tests\DBAL\Platforms
;
use
Doctrine\DBAL\Platforms\MySQL57Platform
;
use
Doctrine\DBAL\Platforms\MySQL57Platform
;
use
Doctrine\DBAL\Types\Type
;
class
MySQL57PlatformTest
extends
AbstractMySQLPlatformTestCase
class
MySQL57PlatformTest
extends
AbstractMySQLPlatformTestCase
{
{
...
@@ -27,7 +28,7 @@ class MySQL57PlatformTest extends AbstractMySQLPlatformTestCase
...
@@ -27,7 +28,7 @@ class MySQL57PlatformTest extends AbstractMySQLPlatformTestCase
public
function
testInitializesJsonTypeMapping
()
public
function
testInitializesJsonTypeMapping
()
{
{
$this
->
assertTrue
(
$this
->
_platform
->
hasDoctrineTypeMappingFor
(
'json'
));
$this
->
assertTrue
(
$this
->
_platform
->
hasDoctrineTypeMappingFor
(
'json'
));
$this
->
assertSame
(
'json_array'
,
$this
->
_platform
->
getDoctrineTypeMapping
(
'json'
));
$this
->
assertSame
(
Type
::
JSON
,
$this
->
_platform
->
getDoctrineTypeMapping
(
'json'
));
}
}
/**
/**
...
...
tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL92PlatformTest.php
View file @
31d01283
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
Doctrine\Tests\DBAL\Platforms
;
namespace
Doctrine\Tests\DBAL\Platforms
;
use
Doctrine\DBAL\Platforms\PostgreSQL92Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL92Platform
;
use
Doctrine\DBAL\Types\Type
;
class
PostgreSQL92PlatformTest
extends
AbstractPostgreSqlPlatformTestCase
class
PostgreSQL92PlatformTest
extends
AbstractPostgreSqlPlatformTestCase
{
{
...
@@ -54,7 +55,7 @@ class PostgreSQL92PlatformTest extends AbstractPostgreSqlPlatformTestCase
...
@@ -54,7 +55,7 @@ class PostgreSQL92PlatformTest extends AbstractPostgreSqlPlatformTestCase
public
function
testInitializesJsonTypeMapping
()
public
function
testInitializesJsonTypeMapping
()
{
{
$this
->
assertTrue
(
$this
->
_platform
->
hasDoctrineTypeMappingFor
(
'json'
));
$this
->
assertTrue
(
$this
->
_platform
->
hasDoctrineTypeMappingFor
(
'json'
));
$this
->
assertEquals
(
'json_array'
,
$this
->
_platform
->
getDoctrineTypeMapping
(
'json'
));
$this
->
assertEquals
(
Type
::
JSON
,
$this
->
_platform
->
getDoctrineTypeMapping
(
'json'
));
}
}
/**
/**
...
...
tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php
View file @
31d01283
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
Doctrine\Tests\DBAL\Platforms
;
namespace
Doctrine\Tests\DBAL\Platforms
;
use
Doctrine\DBAL\Platforms\PostgreSQL94Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL94Platform
;
use
Doctrine\DBAL\Types\Type
;
class
PostgreSQL94PlatformTest
extends
PostgreSQL92PlatformTest
class
PostgreSQL94PlatformTest
extends
PostgreSQL92PlatformTest
{
{
...
@@ -25,6 +26,6 @@ class PostgreSQL94PlatformTest extends PostgreSQL92PlatformTest
...
@@ -25,6 +26,6 @@ class PostgreSQL94PlatformTest extends PostgreSQL92PlatformTest
{
{
parent
::
testInitializesJsonTypeMapping
();
parent
::
testInitializesJsonTypeMapping
();
$this
->
assertTrue
(
$this
->
_platform
->
hasDoctrineTypeMappingFor
(
'jsonb'
));
$this
->
assertTrue
(
$this
->
_platform
->
hasDoctrineTypeMappingFor
(
'jsonb'
));
$this
->
assertEquals
(
'json_array'
,
$this
->
_platform
->
getDoctrineTypeMapping
(
'jsonb'
));
$this
->
assertEquals
(
Type
::
JSON
,
$this
->
_platform
->
getDoctrineTypeMapping
(
'jsonb'
));
}
}
}
}
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