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
355d242f
Unverified
Commit
355d242f
authored
Jun 13, 2019
by
Claudio Zizza
Committed by
Sergei Morozov
Nov 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Postgres 9.3 and MariaDB 10.0 support
parent
e5b500a9
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
51 additions
and
167 deletions
+51
-167
.travis.yml
.travis.yml
+1
-18
UPGRADE.md
UPGRADE.md
+16
-0
configuration.rst
docs/en/reference/configuration.rst
+5
-5
platforms.rst
docs/en/reference/platforms.rst
+1
-2
types.rst
docs/en/reference/types.rst
+1
-3
AbstractPostgreSQLDriver.php
lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php
+5
-9
PostgreSQL100Keywords.php
...octrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php
+1
-1
PostgreSQL94Keywords.php
...Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php
+0
-34
PostgreSQLKeywords.php
lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php
+2
-2
PostgreSQL100Platform.php
lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php
+1
-1
PostgreSQL94Platform.php
lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php
+0
-45
PostgreSqlPlatform.php
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+5
-0
ReservedWordsCommand.php
...trine/DBAL/Tools/Console/Command/ReservedWordsCommand.php
+3
-3
AbstractPostgreSQLDriverTest.php
...ctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php
+3
-7
PostgreSqlSchemaManagerTest.php
...ts/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php
+2
-2
PostgreSQL100PlatformTest.php
...ctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php
+1
-1
PostgreSQL94PlatformTest.php
...octrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php
+0
-34
PostgreSqlPlatformTest.php
.../Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php
+4
-0
No files found.
.travis.yml
View file @
355d242f
...
@@ -144,11 +144,6 @@ jobs:
...
@@ -144,11 +144,6 @@ jobs:
-
docker
-
docker
before_script
:
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
-
bash ./tests/travis/install-mysql-8.0.sh
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb MARIADB_VERSION=10.0 COVERAGE=yes
addons
:
mariadb
:
10.0
-
stage
:
Test
-
stage
:
Test
php
:
7.3
php
:
7.3
env
:
DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes
env
:
DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes
...
@@ -164,11 +159,6 @@ jobs:
...
@@ -164,11 +159,6 @@ jobs:
env
:
DB=mariadb MARIADB_VERSION=10.3 COVERAGE=yes
env
:
DB=mariadb MARIADB_VERSION=10.3 COVERAGE=yes
addons
:
addons
:
mariadb
:
10.3
mariadb
:
10.3
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.0 COVERAGE=yes
addons
:
mariadb
:
10.0
-
stage
:
Test
-
stage
:
Test
php
:
7.3
php
:
7.3
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.1 COVERAGE=yes
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.1 COVERAGE=yes
...
@@ -184,13 +174,6 @@ jobs:
...
@@ -184,13 +174,6 @@ jobs:
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.3 COVERAGE=yes
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.3 COVERAGE=yes
addons
:
addons
:
mariadb
:
10.3
mariadb
:
10.3
-
stage
:
Test
php
:
7.3
env
:
DB=pgsql POSTGRESQL_VERSION=9.3 COVERAGE=yes
services
:
-
postgresql
addons
:
postgresql
:
"
9.3"
-
stage
:
Test
-
stage
:
Test
php
:
7.3
php
:
7.3
env
:
DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
env
:
DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
...
@@ -219,7 +202,7 @@ jobs:
...
@@ -219,7 +202,7 @@ jobs:
services
:
services
:
-
postgresql
-
postgresql
addons
:
addons
:
postgresql
:
"
9.6
"
postgresql
:
"
10.0
"
before_script
:
before_script
:
-
bash ./tests/travis/install-postgres-10.sh
-
bash ./tests/travis/install-postgres-10.sh
-
stage
:
Test
-
stage
:
Test
...
...
UPGRADE.md
View file @
355d242f
# Upgrade to 3.0
# Upgrade to 3.0
## BC BREAK: Removed support for PostgreSQL 9.3 and older
DBAL now requires PostgeSQL 9.4 or newer, support for unmaintained versions has been dropped.
If you are using any of the legacy versions, you have to upgrade to newer PostgreSQL version (9.6+ is recommended).
`Doctrine\DBAL\Platforms\PostgreSqlPlatform`
and
`Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords`
now represent the PostgreSQL 9.4.
The following classes have been removed:
*
`Doctrine\DBAL\Platforms\PostgreSQL94Platform`
*
`Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords`
## BC BREAK: Removed support for MariaDB 10.0 and older
DBAL now requires MariaDB 10.1 or newer, support for unmaintained versions has been dropped.
If you are using any of the legacy versions, you have to upgrade to newer PostgreSQL version (10.1+ is recommended).
## BC BREAK: Changes in obtaining the currently selected database name
## BC BREAK: Changes in obtaining the currently selected database name
-
The
`Doctrine\DBAL\Driver::getDatabase()`
method has been removed. Please use
`Doctrine\DBAL\Connection::getDatabase()`
instead.
-
The
`Doctrine\DBAL\Driver::getDatabase()`
method has been removed. Please use
`Doctrine\DBAL\Connection::getDatabase()`
instead.
...
...
docs/en/reference/configuration.rst
View file @
355d242f
...
@@ -229,20 +229,20 @@ pdo_pgsql
...
@@ -229,20 +229,20 @@ pdo_pgsql
- ``sslmode`` (string): Determines whether or with what priority
- ``sslmode`` (string): Determines whether or with what priority
a SSL TCP/IP connection will be negotiated with the server.
a SSL TCP/IP connection will be negotiated with the server.
See the list of available modes:
See the list of available modes:
`https://www.postgresql.org/docs/9.
3
/static/libpq-connect.html#LIBPQ-CONNECT-SSLMODE`
`https://www.postgresql.org/docs/9.
4
/static/libpq-connect.html#LIBPQ-CONNECT-SSLMODE`
- ``sslrootcert`` (string): specifies the name of a file containing
- ``sslrootcert`` (string): specifies the name of a file containing
SSL certificate authority (CA) certificate(s). If the file exists,
SSL certificate authority (CA) certificate(s). If the file exists,
the server's certificate will be verified to be signed by one of these
the server's certificate will be verified to be signed by one of these
authorities.
authorities.
See https://www.postgresql.org/docs/9.
3
/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
See https://www.postgresql.org/docs/9.
4
/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
- ``sslcert`` (string): specifies the file name of the client SSL certificate.
- ``sslcert`` (string): specifies the file name of the client SSL certificate.
See `https://www.postgresql.org/docs/9.
3
/static/libpq-connect.html#LIBPQ-CONNECT-SSLCERT`
See `https://www.postgresql.org/docs/9.
4
/static/libpq-connect.html#LIBPQ-CONNECT-SSLCERT`
- ``sslkey`` (string): specifies the location for the secret key used for the
- ``sslkey`` (string): specifies the location for the secret key used for the
client certificate.
client certificate.
See `https://www.postgresql.org/docs/9.
3
/static/libpq-connect.html#LIBPQ-CONNECT-SSLKEY`
See `https://www.postgresql.org/docs/9.
4
/static/libpq-connect.html#LIBPQ-CONNECT-SSLKEY`
- ``sslcrl`` (string): specifies the file name of the SSL certificate
- ``sslcrl`` (string): specifies the file name of the SSL certificate
revocation list (CRL).
revocation list (CRL).
See `https://www.postgresql.org/docs/9.
3
/static/libpq-connect.html#LIBPQ-CONNECT-SSLCRL`
See `https://www.postgresql.org/docs/9.
4
/static/libpq-connect.html#LIBPQ-CONNECT-SSLCRL`
- ``application_name`` (string): Name of the application that is
- ``application_name`` (string): Name of the application that is
connecting to database. Optional. It will be displayed at ``pg_stat_activity``.
connecting to database. Optional. It will be displayed at ``pg_stat_activity``.
...
...
docs/en/reference/platforms.rst
View file @
355d242f
...
@@ -56,8 +56,7 @@ Microsoft SQL Server
...
@@ -56,8 +56,7 @@ Microsoft SQL Server
PostgreSQL
PostgreSQL
^^^^^^^^^^
^^^^^^^^^^
- ``PostgreSqlPlatform`` for all versions.
- ``PostgreSqlPlatform`` for version 9.4 and above.
- ``PostgreSQL94Platform`` for version 9.4 and above.
- ``PostgreSQL100Platform`` for version 10.0 and above.
- ``PostgreSQL100Platform`` for version 10.0 and above.
SAP Sybase SQL Anywhere
SAP Sybase SQL Anywhere
...
...
docs/en/reference/types.rst
View file @
355d242f
...
@@ -741,9 +741,7 @@ Please also notice the mapping specific footnotes for additional information.
...
@@ -741,9 +741,7 @@ Please also notice the mapping specific footnotes for additional information.
| | | | +----------------------------------------------------------+
| | | | +----------------------------------------------------------+
| | | | | ``LONGTEXT`` [19]_ |
| | | | | ``LONGTEXT`` [19]_ |
| | +--------------------------+---------+----------------------------------------------------------+
| | +--------------------------+---------+----------------------------------------------------------+
| | | **PostgreSQL** | < 9.4 | ``JSON`` |
| | | **PostgreSQL** | *all* | ``JSON`` [20]_ |
| | | +---------+----------------------------------------------------------+
| | | | >= 9.4 | ``JSON`` [20]_ |
| | | | +----------------------------------------------------------+
| | | | +----------------------------------------------------------+
| | | | | ``JSONB`` [21]_ |
| | | | | ``JSONB`` [21]_ |
| | +--------------------------+---------+----------------------------------------------------------+
| | +--------------------------+---------+----------------------------------------------------------+
...
...
lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php
View file @
355d242f
...
@@ -12,7 +12,6 @@ use Doctrine\DBAL\Exception\DriverException;
...
@@ -12,7 +12,6 @@ use Doctrine\DBAL\Exception\DriverException;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\Exception\InvalidPlatformVersion
;
use
Doctrine\DBAL\Platforms\Exception\InvalidPlatformVersion
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL94Platform
;
use
Doctrine\DBAL\Platforms\PostgreSqlPlatform
;
use
Doctrine\DBAL\Platforms\PostgreSqlPlatform
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\PostgreSqlSchemaManager
;
use
Doctrine\DBAL\Schema\PostgreSqlSchemaManager
;
...
@@ -29,7 +28,7 @@ abstract class AbstractPostgreSQLDriver implements Driver, ExceptionConverterDri
...
@@ -29,7 +28,7 @@ abstract class AbstractPostgreSQLDriver implements Driver, ExceptionConverterDri
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*
*
* @link http://www.postgresql.org/docs/9.
3
/static/errcodes-appendix.html
* @link http://www.postgresql.org/docs/9.
4
/static/errcodes-appendix.html
*/
*/
public
function
convertException
(
string
$message
,
DriverExceptionInterface
$exception
)
:
DriverException
public
function
convertException
(
string
$message
,
DriverExceptionInterface
$exception
)
:
DriverException
{
{
...
@@ -97,14 +96,11 @@ abstract class AbstractPostgreSQLDriver implements Driver, ExceptionConverterDri
...
@@ -97,14 +96,11 @@ abstract class AbstractPostgreSQLDriver implements Driver, ExceptionConverterDri
$patchVersion
=
$versionParts
[
'patch'
]
??
0
;
$patchVersion
=
$versionParts
[
'patch'
]
??
0
;
$version
=
$majorVersion
.
'.'
.
$minorVersion
.
'.'
.
$patchVersion
;
$version
=
$majorVersion
.
'.'
.
$minorVersion
.
'.'
.
$patchVersion
;
switch
(
true
)
{
if
(
version_compare
(
$version
,
'10.0'
,
'>='
))
{
case
version_compare
(
$version
,
'10.0'
,
'>='
)
:
return
new
PostgreSQL100Platform
();
return
new
PostgreSQL100Platform
();
case
version_compare
(
$version
,
'9.4'
,
'>='
)
:
return
new
PostgreSQL94Platform
();
default
:
return
new
PostgreSqlPlatform
();
}
}
return
new
PostgreSqlPlatform
();
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php
View file @
355d242f
...
@@ -7,7 +7,7 @@ namespace Doctrine\DBAL\Platforms\Keywords;
...
@@ -7,7 +7,7 @@ namespace Doctrine\DBAL\Platforms\Keywords;
/**
/**
* PostgreSQL 10.0 reserved keywords list.
* PostgreSQL 10.0 reserved keywords list.
*/
*/
class
PostgreSQL100Keywords
extends
PostgreSQL
94
Keywords
class
PostgreSQL100Keywords
extends
PostgreSQLKeywords
{
{
/**
/**
* {@inheritdoc}
* {@inheritdoc}
...
...
lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php
deleted
100644 → 0
View file @
e5b500a9
<?php
declare
(
strict_types
=
1
);
namespace
Doctrine\DBAL\Platforms\Keywords
;
use
function
array_diff
;
use
function
array_merge
;
/**
* PostgreSQL 9.4 reserved keywords list.
*/
class
PostgreSQL94Keywords
extends
PostgreSQLKeywords
{
/**
* {@inheritdoc}
*/
public
function
getName
()
:
string
{
return
'PostgreSQL94'
;
}
/**
* {@inheritdoc}
*
* @link http://www.postgresql.org/docs/9.4/static/sql-keywords-appendix.html
*/
protected
function
getKeywords
()
:
array
{
$parentKeywords
=
array_diff
(
parent
::
getKeywords
(),
[
'OVER'
]);
return
array_merge
(
$parentKeywords
,
[
'LATERAL'
]);
}
}
lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php
View file @
355d242f
...
@@ -5,7 +5,7 @@ declare(strict_types=1);
...
@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace
Doctrine\DBAL\Platforms\Keywords
;
namespace
Doctrine\DBAL\Platforms\Keywords
;
/**
/**
* PostgreSQL
9.3
keywords list.
* PostgreSQL keywords list.
*/
*/
class
PostgreSQLKeywords
extends
KeywordList
class
PostgreSQLKeywords
extends
KeywordList
{
{
...
@@ -79,6 +79,7 @@ class PostgreSQLKeywords extends KeywordList
...
@@ -79,6 +79,7 @@ class PostgreSQLKeywords extends KeywordList
'IS'
,
'IS'
,
'ISNULL'
,
'ISNULL'
,
'JOIN'
,
'JOIN'
,
'LATERAL'
,
'LEADING'
,
'LEADING'
,
'LEFT'
,
'LEFT'
,
'LIKE'
,
'LIKE'
,
...
@@ -95,7 +96,6 @@ class PostgreSQLKeywords extends KeywordList
...
@@ -95,7 +96,6 @@ class PostgreSQLKeywords extends KeywordList
'OR'
,
'OR'
,
'ORDER'
,
'ORDER'
,
'OUTER'
,
'OUTER'
,
'OVER'
,
'OVERLAPS'
,
'OVERLAPS'
,
'PLACING'
,
'PLACING'
,
'PRIMARY'
,
'PRIMARY'
,
...
...
lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php
View file @
355d242f
...
@@ -9,7 +9,7 @@ use Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords;
...
@@ -9,7 +9,7 @@ use Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords;
/**
/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform.
* Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform.
*/
*/
class
PostgreSQL100Platform
extends
PostgreS
QL94
Platform
class
PostgreSQL100Platform
extends
PostgreS
ql
Platform
{
{
/**
/**
* {@inheritdoc}
* {@inheritdoc}
...
...
lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php
deleted
100644 → 0
View file @
e5b500a9
<?php
declare
(
strict_types
=
1
);
namespace
Doctrine\DBAL\Platforms
;
use
Doctrine\DBAL\Types\Types
;
/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.4 database platform.
*/
class
PostgreSQL94Platform
extends
PostgreSqlPlatform
{
/**
* {@inheritdoc}
*
* @return string
*/
public
function
getJsonTypeDeclarationSQL
(
array
$field
)
:
string
{
if
(
!
empty
(
$field
[
'jsonb'
]))
{
return
'JSONB'
;
}
return
'JSON'
;
}
/**
* {@inheritdoc}
*/
protected
function
getReservedKeywordsClass
()
:
string
{
return
Keywords\PostgreSQL94Keywords
::
class
;
}
/**
* {@inheritdoc}
*/
protected
function
initializeDoctrineTypeMappings
()
:
void
{
parent
::
initializeDoctrineTypeMappings
();
$this
->
doctrineTypeMapping
[
'jsonb'
]
=
Types
::
JSON
;
}
}
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
View file @
355d242f
...
@@ -1136,6 +1136,7 @@ SQL
...
@@ -1136,6 +1136,7 @@ SQL
'integer'
=>
'integer'
,
'integer'
=>
'integer'
,
'interval'
=>
'string'
,
'interval'
=>
'string'
,
'json'
=>
Type
::
JSON
,
'json'
=>
Type
::
JSON
,
'jsonb'
=>
Type
::
JSON
,
'money'
=>
'decimal'
,
'money'
=>
'decimal'
,
'numeric'
=>
'decimal'
,
'numeric'
=>
'decimal'
,
'serial'
=>
'integer'
,
'serial'
=>
'integer'
,
...
@@ -1213,6 +1214,10 @@ SQL
...
@@ -1213,6 +1214,10 @@ SQL
*/
*/
public
function
getJsonTypeDeclarationSQL
(
array
$field
)
:
string
public
function
getJsonTypeDeclarationSQL
(
array
$field
)
:
string
{
{
if
(
!
empty
(
$field
[
'jsonb'
]))
{
return
'JSONB'
;
}
return
'JSON'
;
return
'JSON'
;
}
}
...
...
lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php
View file @
355d242f
...
@@ -6,12 +6,12 @@ namespace Doctrine\DBAL\Tools\Console\Command;
...
@@ -6,12 +6,12 @@ namespace Doctrine\DBAL\Tools\Console\Command;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Platforms\Keywords\DB2Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\DB2Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\MariaDb102Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\MySQL80Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\MySQL80Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\MySQLKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\MySQLKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\OracleKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\OracleKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\ReservedKeywordsValidator
;
use
Doctrine\DBAL\Platforms\Keywords\ReservedKeywordsValidator
;
use
Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords
;
...
@@ -36,9 +36,9 @@ class ReservedWordsCommand extends Command
...
@@ -36,9 +36,9 @@ class ReservedWordsCommand extends Command
'mysql'
=>
MySQLKeywords
::
class
,
'mysql'
=>
MySQLKeywords
::
class
,
'mysql57'
=>
MySQL57Keywords
::
class
,
'mysql57'
=>
MySQL57Keywords
::
class
,
'mysql80'
=>
MySQL80Keywords
::
class
,
'mysql80'
=>
MySQL80Keywords
::
class
,
'mariadb102'
=>
MariaDb102Keywords
::
class
,
'oracle'
=>
OracleKeywords
::
class
,
'oracle'
=>
OracleKeywords
::
class
,
'pgsql'
=>
PostgreSQLKeywords
::
class
,
'pgsql'
=>
PostgreSQLKeywords
::
class
,
'pgsql94'
=>
PostgreSQL94Keywords
::
class
,
'pgsql100'
=>
PostgreSQL100Keywords
::
class
,
'pgsql100'
=>
PostgreSQL100Keywords
::
class
,
'sqlanywhere'
=>
SQLAnywhereKeywords
::
class
,
'sqlanywhere'
=>
SQLAnywhereKeywords
::
class
,
'sqlite'
=>
SQLiteKeywords
::
class
,
'sqlite'
=>
SQLiteKeywords
::
class
,
...
@@ -88,8 +88,8 @@ The following keyword lists are currently shipped with Doctrine:
...
@@ -88,8 +88,8 @@ The following keyword lists are currently shipped with Doctrine:
* mysql
* mysql
* mysql57
* mysql57
* mysql80
* mysql80
* mariadb102
* pgsql
* pgsql
* pgsql94
* pgsql100
* pgsql100
* sqlite
* sqlite
* oracle
* oracle
...
...
tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php
View file @
355d242f
...
@@ -9,7 +9,6 @@ use Doctrine\DBAL\Driver;
...
@@ -9,7 +9,6 @@ use Doctrine\DBAL\Driver;
use
Doctrine\DBAL\Driver\AbstractPostgreSQLDriver
;
use
Doctrine\DBAL\Driver\AbstractPostgreSQLDriver
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL94Platform
;
use
Doctrine\DBAL\Platforms\PostgreSqlPlatform
;
use
Doctrine\DBAL\Platforms\PostgreSqlPlatform
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\PostgreSqlSchemaManager
;
use
Doctrine\DBAL\Schema\PostgreSqlSchemaManager
;
...
@@ -37,12 +36,9 @@ class AbstractPostgreSQLDriverTest extends AbstractDriverTest
...
@@ -37,12 +36,9 @@ class AbstractPostgreSQLDriverTest extends AbstractDriverTest
protected
function
getDatabasePlatformsForVersions
()
:
array
protected
function
getDatabasePlatformsForVersions
()
:
array
{
{
return
[
return
[
[
'9.3'
,
PostgreSqlPlatform
::
class
],
[
'9.4'
,
PostgreSqlPlatform
::
class
],
[
'9.3.0'
,
PostgreSqlPlatform
::
class
],
[
'9.4.0'
,
PostgreSqlPlatform
::
class
],
[
'9.3.6'
,
PostgreSqlPlatform
::
class
],
[
'9.4.1'
,
PostgreSqlPlatform
::
class
],
[
'9.4'
,
PostgreSQL94Platform
::
class
],
[
'9.4.0'
,
PostgreSQL94Platform
::
class
],
[
'9.4.1'
,
PostgreSQL94Platform
::
class
],
[
'10'
,
PostgreSQL100Platform
::
class
],
[
'10'
,
PostgreSQL100Platform
::
class
],
];
];
}
}
...
...
tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php
View file @
355d242f
...
@@ -5,7 +5,7 @@ declare(strict_types=1);
...
@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace
Doctrine\Tests\DBAL\Functional\Schema
;
namespace
Doctrine\Tests\DBAL\Functional\Schema
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Schema
;
use
Doctrine\DBAL\Schema
;
use
Doctrine\DBAL\Schema\Comparator
;
use
Doctrine\DBAL\Schema\Comparator
;
use
Doctrine\DBAL\Schema\ForeignKeyConstraint
;
use
Doctrine\DBAL\Schema\ForeignKeyConstraint
;
...
@@ -399,7 +399,7 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
...
@@ -399,7 +399,7 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public
function
testJsonbColumn
()
:
void
public
function
testJsonbColumn
()
:
void
{
{
if
(
!
$this
->
schemaManager
->
getDatabasePlatform
()
instanceof
PostgreS
QL94
Platform
)
{
if
(
!
$this
->
schemaManager
->
getDatabasePlatform
()
instanceof
PostgreS
ql
Platform
)
{
$this
->
markTestSkipped
(
'Requires PostgresSQL 9.4+'
);
$this
->
markTestSkipped
(
'Requires PostgresSQL 9.4+'
);
return
;
return
;
...
...
tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php
View file @
355d242f
...
@@ -7,7 +7,7 @@ namespace Doctrine\Tests\DBAL\Platforms;
...
@@ -7,7 +7,7 @@ namespace Doctrine\Tests\DBAL\Platforms;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
class
PostgreSQL100PlatformTest
extends
PostgreS
QL94
PlatformTest
class
PostgreSQL100PlatformTest
extends
PostgreS
ql
PlatformTest
{
{
/**
/**
* {@inheritdoc}
* {@inheritdoc}
...
...
tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php
deleted
100644 → 0
View file @
e5b500a9
<?php
declare
(
strict_types
=
1
);
namespace
Doctrine\Tests\DBAL\Platforms
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\PostgreSQL94Platform
;
use
Doctrine\DBAL\Types\Types
;
class
PostgreSQL94PlatformTest
extends
PostgreSqlPlatformTest
{
/**
* {@inheritdoc}
*/
public
function
createPlatform
()
:
AbstractPlatform
{
return
new
PostgreSQL94Platform
();
}
public
function
testReturnsJsonTypeDeclarationSQL
()
:
void
{
parent
::
testReturnsJsonTypeDeclarationSQL
();
self
::
assertSame
(
'JSON'
,
$this
->
platform
->
getJsonTypeDeclarationSQL
([
'jsonb'
=>
false
]));
self
::
assertSame
(
'JSONB'
,
$this
->
platform
->
getJsonTypeDeclarationSQL
([
'jsonb'
=>
true
]));
}
public
function
testInitializesJsonTypeMapping
()
:
void
{
parent
::
testInitializesJsonTypeMapping
();
self
::
assertTrue
(
$this
->
platform
->
hasDoctrineTypeMappingFor
(
'jsonb'
));
self
::
assertEquals
(
Types
::
JSON
,
$this
->
platform
->
getDoctrineTypeMapping
(
'jsonb'
));
}
}
tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php
View file @
355d242f
...
@@ -59,6 +59,8 @@ class PostgreSqlPlatformTest extends AbstractPostgreSqlPlatformTestCase
...
@@ -59,6 +59,8 @@ class PostgreSqlPlatformTest extends AbstractPostgreSqlPlatformTestCase
public
function
testReturnsJsonTypeDeclarationSQL
()
:
void
public
function
testReturnsJsonTypeDeclarationSQL
()
:
void
{
{
self
::
assertSame
(
'JSON'
,
$this
->
platform
->
getJsonTypeDeclarationSQL
([]));
self
::
assertSame
(
'JSON'
,
$this
->
platform
->
getJsonTypeDeclarationSQL
([]));
self
::
assertSame
(
'JSON'
,
$this
->
platform
->
getJsonTypeDeclarationSQL
([
'jsonb'
=>
false
]));
self
::
assertSame
(
'JSONB'
,
$this
->
platform
->
getJsonTypeDeclarationSQL
([
'jsonb'
=>
true
]));
}
}
public
function
testReturnsSmallIntTypeDeclarationSQL
()
:
void
public
function
testReturnsSmallIntTypeDeclarationSQL
()
:
void
...
@@ -86,6 +88,8 @@ class PostgreSqlPlatformTest extends AbstractPostgreSqlPlatformTestCase
...
@@ -86,6 +88,8 @@ class PostgreSqlPlatformTest extends AbstractPostgreSqlPlatformTestCase
{
{
self
::
assertTrue
(
$this
->
platform
->
hasDoctrineTypeMappingFor
(
'json'
));
self
::
assertTrue
(
$this
->
platform
->
hasDoctrineTypeMappingFor
(
'json'
));
self
::
assertEquals
(
Type
::
JSON
,
$this
->
platform
->
getDoctrineTypeMapping
(
'json'
));
self
::
assertEquals
(
Type
::
JSON
,
$this
->
platform
->
getDoctrineTypeMapping
(
'json'
));
self
::
assertTrue
(
$this
->
platform
->
hasDoctrineTypeMappingFor
(
'jsonb'
));
self
::
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