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
7811e4ee
Unverified
Commit
7811e4ee
authored
Mar 20, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '3.0.x'
parents
01143c9c
40cc9bd5
Changes
34
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
168 additions
and
172 deletions
+168
-172
UPGRADE.md
UPGRADE.md
+72
-66
configuration.rst
docs/en/reference/configuration.rst
+1
-1
platforms.rst
docs/en/reference/platforms.rst
+2
-6
AbstractPostgreSQLDriver.php
lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php
+3
-3
AbstractSQLAnywhereDriver.php
lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php
+3
-3
AbstractSQLServerDriver.php
lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php
+2
-2
PostgreSQL100Keywords.php
...octrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php
+1
-1
PostgreSQL94Keywords.php
...Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php
+3
-3
SQLAnywhere16Keywords.php
...octrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php
+3
-3
SQLServer2012Keywords.php
...octrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php
+3
-5
PostgreSQL100Platform.php
lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php
+1
-1
PostgreSQL94Platform.php
lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php
+2
-4
SQLAnywhere16Platform.php
lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php
+3
-4
SQLServer2012Platform.php
lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php
+3
-4
PostgreSqlSchemaManager.php
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
+3
-3
SQLAnywhereSchemaManager.php
lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php
+3
-3
SQLServerSchemaManager.php
lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php
+2
-2
ReservedWordsCommand.php
...trine/DBAL/Tools/Console/Command/ReservedWordsCommand.php
+6
-6
AbstractPostgreSQLDriverTest.php
...ctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php
+5
-5
AbstractSQLAnywhereDriverTest.php
...trine/Tests/DBAL/Driver/AbstractSQLAnywhereDriverTest.php
+9
-9
AbstractSQLServerDriverTest.php
...octrine/Tests/DBAL/Driver/AbstractSQLServerDriverTest.php
+3
-3
ConnectionTest.php
tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php
+2
-2
PDOPgsqlConnectionTest.php
...e/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php
+2
-2
ExceptionTest.php
tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php
+2
-2
PostgreSQL.php
.../Tests/DBAL/Functional/Platform/ColumnTest/PostgreSQL.php
+2
-2
SQLServer.php
...e/Tests/DBAL/Functional/Platform/ColumnTest/SQLServer.php
+2
-2
PostgreSqlSchemaManagerTest.php
...ts/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php
+2
-2
AbstractPostgreSQLPlatformTestCase.php
...sts/DBAL/Platforms/AbstractPostgreSQLPlatformTestCase.php
+6
-6
AbstractSQLServerPlatformTestCase.php
...ests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php
+2
-2
PostgreSQL100PlatformTest.php
...ctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php
+1
-1
PostgreSQL94PlatformTest.php
...octrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php
+4
-4
SQLAnywhere16PlatformTest.php
...ctrine/Tests/DBAL/Platforms/SQLAnywhere16PlatformTest.php
+5
-5
SQLServerPlatform2012Test.php
...ctrine/Tests/DBAL/Platforms/SQLServerPlatform2012Test.php
+3
-3
ColumnTest.php
tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php
+2
-2
No files found.
UPGRADE.md
View file @
7811e4ee
This diff is collapsed.
Click to expand it.
docs/en/reference/configuration.rst
View file @
7811e4ee
...
...
@@ -351,7 +351,7 @@ You can also pass this option if you want to disable automatic database platform
detection for a driver that natively supports it and choose the platform version
implementation explicitly.
If you are running a MariaDB database, you should prefix the ``serverVersion``
If you are running a MariaDB database, you should prefix the ``serverVersion``
with ``mariadb-`` (ex: ``mariadb-10.2.12``).
Custom Platform
...
...
docs/en/reference/platforms.rst
View file @
7811e4ee
...
...
@@ -50,20 +50,17 @@ Oracle
Microsoft SQL Server
^^^^^^^^^^^^^^^^^^^^
- ``SQLServerPlatform`` for version 2012 and above.
- ``SQLServer
2012
Platform`` for version 2012 and above.
PostgreSQL
^^^^^^^^^^
- ``PostgreS
ql
Platform`` for version 9.4 and above.
- ``PostgreS
QL94
Platform`` for version 9.4 and above.
- ``PostgreSQL100Platform`` for version 10.0 and above.
SAP Sybase SQL Anywhere
^^^^^^^^^^^^^^^^^^^^^^^
- ``SQLAnywherePlatform`` for version 10 and above.
- ``SQLAnywhere11Platform`` for version 11 and above.
- ``SQLAnywhere12Platform`` for version 12 and above.
- ``SQLAnywhere16Platform`` for version 16 and above.
SQLite
...
...
@@ -103,4 +100,3 @@ all the different database vendors, for example MySQL BIGINT and
Oracle NUMBER should be handled as integer. Doctrine 2 offers a
powerful way to abstract the database to php and back conversion,
which is described in the next section.
lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php
View file @
7811e4ee
...
...
@@ -11,7 +11,7 @@ use Doctrine\DBAL\Exception\DriverException;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\Exception\InvalidPlatformVersion
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\PostgreSqlSchemaManager
;
use
Doctrine\DBAL\VersionAwarePlatformDriver
;
...
...
@@ -98,12 +98,12 @@ abstract class AbstractPostgreSQLDriver implements ExceptionConverterDriver, Ver
return
new
PostgreSQL100Platform
();
}
return
new
PostgreS
ql
Platform
();
return
new
PostgreS
QL94
Platform
();
}
public
function
getDatabasePlatform
()
:
AbstractPlatform
{
return
new
PostgreS
ql
Platform
();
return
new
PostgreS
QL94
Platform
();
}
public
function
getSchemaManager
(
Connection
$conn
)
:
AbstractSchemaManager
...
...
lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php
View file @
7811e4ee
...
...
@@ -10,7 +10,7 @@ use Doctrine\DBAL\Exception;
use
Doctrine\DBAL\Exception\DriverException
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\Exception\InvalidPlatformVersion
;
use
Doctrine\DBAL\Platforms\SQLAnywherePlatform
;
use
Doctrine\DBAL\Platforms\SQLAnywhere
16
Platform
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\SQLAnywhereSchemaManager
;
use
Doctrine\DBAL\VersionAwarePlatformDriver
;
...
...
@@ -89,12 +89,12 @@ abstract class AbstractSQLAnywhereDriver implements ExceptionConverterDriver, Ve
);
}
return
new
SQLAnywherePlatform
();
return
new
SQLAnywhere
16
Platform
();
}
public
function
getDatabasePlatform
()
:
AbstractPlatform
{
return
new
SQLAnywherePlatform
();
return
new
SQLAnywhere
16
Platform
();
}
public
function
getSchemaManager
(
Connection
$conn
)
:
AbstractSchemaManager
...
...
lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php
View file @
7811e4ee
...
...
@@ -7,7 +7,7 @@ namespace Doctrine\DBAL\Driver;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Driver
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\SQLServerPlatform
;
use
Doctrine\DBAL\Platforms\SQLServer
2012
Platform
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\SQLServerSchemaManager
;
...
...
@@ -18,7 +18,7 @@ abstract class AbstractSQLServerDriver implements Driver
{
public
function
getDatabasePlatform
()
:
AbstractPlatform
{
return
new
SQLServerPlatform
();
return
new
SQLServer
2012
Platform
();
}
public
function
getSchemaManager
(
Connection
$conn
)
:
AbstractSchemaManager
...
...
lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php
View file @
7811e4ee
...
...
@@ -7,7 +7,7 @@ namespace Doctrine\DBAL\Platforms\Keywords;
/**
* PostgreSQL 10.0 reserved keywords list.
*/
class
PostgreSQL100Keywords
extends
PostgreSQLKeywords
class
PostgreSQL100Keywords
extends
PostgreSQL
94
Keywords
{
public
function
getName
()
:
string
{
...
...
lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php
→
lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL
94
Keywords.php
View file @
7811e4ee
...
...
@@ -5,13 +5,13 @@ declare(strict_types=1);
namespace
Doctrine\DBAL\Platforms\Keywords
;
/**
* PostgreSQL keywords list.
* PostgreSQL
9.4 reserved
keywords list.
*/
class
PostgreSQLKeywords
extends
KeywordList
class
PostgreSQL
94
Keywords
extends
KeywordList
{
public
function
getName
()
:
string
{
return
'PostgreSQL'
;
return
'PostgreSQL
94
'
;
}
/**
...
...
lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php
→
lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere
16
Keywords.php
View file @
7811e4ee
...
...
@@ -5,13 +5,13 @@ declare(strict_types=1);
namespace
Doctrine\DBAL\Platforms\Keywords
;
/**
* SAP Sybase SQL Anywhere 1
0
reserved keywords list.
* SAP Sybase SQL Anywhere 1
6
reserved keywords list.
*/
class
SQLAnywhereKeywords
extends
KeywordList
class
SQLAnywhere
16
Keywords
extends
KeywordList
{
public
function
getName
()
:
string
{
return
'SQLAnywhere'
;
return
'SQLAnywhere
16
'
;
}
/**
...
...
lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php
→
lib/Doctrine/DBAL/Platforms/Keywords/SQLServer
2012
Keywords.php
View file @
7811e4ee
...
...
@@ -5,15 +5,13 @@ declare(strict_types=1);
namespace
Doctrine\DBAL\Platforms\Keywords
;
/**
* Microsoft SQL Server 2000 reserved keyword dictionary.
*
* @link www.doctrine-project.com
* Microsoft SQL Server 2012 reserved keyword dictionary.
*/
class
SQLServerKeywords
extends
KeywordList
class
SQLServer
2012
Keywords
extends
KeywordList
{
public
function
getName
()
:
string
{
return
'SQLServer'
;
return
'SQLServer
2012
'
;
}
/**
...
...
lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php
View file @
7811e4ee
...
...
@@ -9,7 +9,7 @@ use Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords;
/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform.
*/
class
PostgreSQL100Platform
extends
PostgreS
ql
Platform
class
PostgreSQL100Platform
extends
PostgreS
QL94
Platform
{
protected
function
getReservedKeywordsClass
()
:
string
{
...
...
lib/Doctrine/DBAL/Platforms/PostgreS
ql
Platform.php
→
lib/Doctrine/DBAL/Platforms/PostgreS
QL94
Platform.php
View file @
7811e4ee
...
...
@@ -36,10 +36,8 @@ use function trim;
/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.4+ database platform.
*
* @todo Rename: PostgreSQLPlatform
*/
class
PostgreS
ql
Platform
extends
AbstractPlatform
class
PostgreS
QL94
Platform
extends
AbstractPlatform
{
/** @var bool */
private
$useBooleanTrueFalseStrings
=
true
;
...
...
@@ -1036,7 +1034,7 @@ SQL
protected
function
getReservedKeywordsClass
()
:
string
{
return
Keywords\PostgreSQLKeywords
::
class
;
return
Keywords\PostgreSQL
94
Keywords
::
class
;
}
/**
...
...
lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php
→
lib/Doctrine/DBAL/Platforms/SQLAnywhere
16
Platform.php
View file @
7811e4ee
...
...
@@ -36,10 +36,9 @@ use function strtoupper;
use
function
substr
;
/**
* The SQLAnywherePlatform provides the behavior, features and SQL dialect of the
* SAP Sybase SQL Anywhere 12 database platform.
* Provides the behavior, features and SQL dialect of the SAP Sybase SQL Anywhere 16 database platform.
*/
class
SQLAnywherePlatform
extends
AbstractPlatform
class
SQLAnywhere
16
Platform
extends
AbstractPlatform
{
public
const
FOREIGN_KEY_MATCH_SIMPLE
=
1
;
public
const
FOREIGN_KEY_MATCH_FULL
=
2
;
...
...
@@ -1310,7 +1309,7 @@ SQL
protected
function
getReservedKeywordsClass
()
:
string
{
return
Keywords\SQLAnywhereKeywords
::
class
;
return
Keywords\SQLAnywhere
16
Keywords
::
class
;
}
protected
function
initializeDoctrineTypeMappings
()
:
void
...
...
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
→
lib/Doctrine/DBAL/Platforms/SQLServer
2012
Platform.php
View file @
7811e4ee
...
...
@@ -38,10 +38,9 @@ use function substr_count;
use
const
PREG_OFFSET_CAPTURE
;
/**
* The SQLServerPlatform provides the behavior, features and SQL dialect of the
* Microsoft SQL Server database platform.
* Provides the behavior, features and SQL dialect of the Microsoft SQL Server 2012 database platform.
*/
class
SQLServerPlatform
extends
AbstractPlatform
class
SQLServer
2012
Platform
extends
AbstractPlatform
{
public
function
getCurrentDateSQL
()
:
string
{
...
...
@@ -1370,7 +1369,7 @@ SQL
protected
function
getReservedKeywordsClass
()
:
string
{
return
Keywords\SQLServerKeywords
::
class
;
return
Keywords\SQLServer
2012
Keywords
::
class
;
}
public
function
quoteSingleIdentifier
(
string
$str
)
:
string
...
...
lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php
View file @
7811e4ee
...
...
@@ -6,7 +6,7 @@ namespace Doctrine\DBAL\Schema;
use
Doctrine\DBAL\Exception\DriverException
;
use
Doctrine\DBAL\FetchMode
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\DBAL\Types\Type
;
use
Doctrine\DBAL\Types\Types
;
use
function
array_change_key_case
;
...
...
@@ -110,7 +110,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
throw
$exception
;
}
assert
(
$this
->
_platform
instanceof
PostgreS
ql
Platform
);
assert
(
$this
->
_platform
instanceof
PostgreS
QL94
Platform
);
$this
->
_execSql
(
[
...
...
@@ -494,7 +494,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
$table
=
parent
::
listTableDetails
(
$tableName
);
$platform
=
$this
->
_platform
;
assert
(
$platform
instanceof
PostgreS
ql
Platform
);
assert
(
$platform
instanceof
PostgreS
QL94
Platform
);
$sql
=
$platform
->
getListTableMetadataSQL
(
$tableName
);
$tableOptions
=
$this
->
_conn
->
fetchAssoc
(
$sql
);
...
...
lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php
View file @
7811e4ee
...
...
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace
Doctrine\DBAL\Schema
;
use
Doctrine\DBAL\Platforms\SQLAnywherePlatform
;
use
Doctrine\DBAL\Platforms\SQLAnywhere
16
Platform
;
use
Doctrine\DBAL\Types\Type
;
use
function
assert
;
use
function
is_string
;
...
...
@@ -47,13 +47,13 @@ class SQLAnywhereSchemaManager extends AbstractSchemaManager
public
function
startDatabase
(
string
$database
)
:
void
{
assert
(
$this
->
_platform
instanceof
SQLAnywherePlatform
);
assert
(
$this
->
_platform
instanceof
SQLAnywhere
16
Platform
);
$this
->
_execSql
(
$this
->
_platform
->
getStartDatabaseSQL
(
$database
));
}
public
function
stopDatabase
(
string
$database
)
:
void
{
assert
(
$this
->
_platform
instanceof
SQLAnywherePlatform
);
assert
(
$this
->
_platform
instanceof
SQLAnywhere
16
Platform
);
$this
->
_execSql
(
$this
->
_platform
->
getStopDatabaseSQL
(
$database
));
}
...
...
lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php
View file @
7811e4ee
...
...
@@ -6,7 +6,7 @@ namespace Doctrine\DBAL\Schema;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Driver\DriverException
;
use
Doctrine\DBAL\Platforms\SQLServerPlatform
;
use
Doctrine\DBAL\Platforms\SQLServer
2012
Platform
;
use
Doctrine\DBAL\Types\Type
;
use
PDOException
;
use
Throwable
;
...
...
@@ -330,7 +330,7 @@ class SQLServerSchemaManager extends AbstractSchemaManager
$table
=
parent
::
listTableDetails
(
$tableName
);
$platform
=
$this
->
_platform
;
assert
(
$platform
instanceof
SQLServerPlatform
);
assert
(
$platform
instanceof
SQLServer
2012
Platform
);
$sql
=
$platform
->
getListTableMetadataSQL
(
$tableName
);
$tableOptions
=
$this
->
_conn
->
fetchAssoc
(
$sql
);
...
...
lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php
View file @
7811e4ee
...
...
@@ -12,11 +12,11 @@ use Doctrine\DBAL\Platforms\Keywords\MySQL80Keywords;
use
Doctrine\DBAL\Platforms\Keywords\MySQLKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\OracleKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\PostgreSQL
94
Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\ReservedKeywordsValidator
;
use
Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\SQLAnywhere
16
Keywords
;
use
Doctrine\DBAL\Platforms\Keywords\SQLiteKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords
;
use
Doctrine\DBAL\Platforms\Keywords\SQLServer
2012
Keywords
;
use
InvalidArgumentException
;
use
Symfony\Component\Console\Command\Command
;
use
Symfony\Component\Console\Input\InputInterface
;
...
...
@@ -38,11 +38,11 @@ class ReservedWordsCommand extends Command
'mysql80'
=>
MySQL80Keywords
::
class
,
'mariadb102'
=>
MariaDb102Keywords
::
class
,
'oracle'
=>
OracleKeywords
::
class
,
'pgsql'
=>
PostgreSQLKeywords
::
class
,
'pgsql'
=>
PostgreSQL
94
Keywords
::
class
,
'pgsql100'
=>
PostgreSQL100Keywords
::
class
,
'sqlanywhere'
=>
SQLAnywhereKeywords
::
class
,
'sqlanywhere'
=>
SQLAnywhere
16
Keywords
::
class
,
'sqlite'
=>
SQLiteKeywords
::
class
,
'sqlserver'
=>
SQLServerKeywords
::
class
,
'sqlserver'
=>
SQLServer
2012
Keywords
::
class
,
];
/**
...
...
tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php
View file @
7811e4ee
...
...
@@ -9,7 +9,7 @@ use Doctrine\DBAL\Driver;
use
Doctrine\DBAL\Driver\AbstractPostgreSQLDriver
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\PostgreSqlSchemaManager
;
...
...
@@ -22,7 +22,7 @@ class AbstractPostgreSQLDriverTest extends AbstractDriverTest
protected
function
createPlatform
()
:
AbstractPlatform
{
return
new
PostgreS
ql
Platform
();
return
new
PostgreS
QL94
Platform
();
}
protected
function
createSchemaManager
(
Connection
$connection
)
:
AbstractSchemaManager
...
...
@@ -36,9 +36,9 @@ class AbstractPostgreSQLDriverTest extends AbstractDriverTest
protected
function
getDatabasePlatformsForVersions
()
:
array
{
return
[
[
'9.4'
,
PostgreS
ql
Platform
::
class
],
[
'9.4.0'
,
PostgreS
ql
Platform
::
class
],
[
'9.4.1'
,
PostgreS
ql
Platform
::
class
],
[
'9.4'
,
PostgreS
QL94
Platform
::
class
],
[
'9.4.0'
,
PostgreS
QL94
Platform
::
class
],
[
'9.4.1'
,
PostgreS
QL94
Platform
::
class
],
[
'10'
,
PostgreSQL100Platform
::
class
],
];
}
...
...
tests/Doctrine/Tests/DBAL/Driver/AbstractSQLAnywhereDriverTest.php
View file @
7811e4ee
...
...
@@ -8,7 +8,7 @@ use Doctrine\DBAL\Connection;
use
Doctrine\DBAL\Driver
;
use
Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\SQLAnywherePlatform
;
use
Doctrine\DBAL\Platforms\SQLAnywhere
16
Platform
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\SQLAnywhereSchemaManager
;
...
...
@@ -21,7 +21,7 @@ class AbstractSQLAnywhereDriverTest extends AbstractDriverTest
protected
function
createPlatform
()
:
AbstractPlatform
{
return
new
SQLAnywherePlatform
();
return
new
SQLAnywhere
16
Platform
();
}
protected
function
createSchemaManager
(
Connection
$connection
)
:
AbstractSchemaManager
...
...
@@ -35,13 +35,13 @@ class AbstractSQLAnywhereDriverTest extends AbstractDriverTest
protected
function
getDatabasePlatformsForVersions
()
:
array
{
return
[
[
'16'
,
SQLAnywherePlatform
::
class
],
[
'16.0'
,
SQLAnywherePlatform
::
class
],
[
'16.0.0'
,
SQLAnywherePlatform
::
class
],
[
'16.0.0.0'
,
SQLAnywherePlatform
::
class
],
[
'16.1.2.3'
,
SQLAnywherePlatform
::
class
],
[
'16.9.9.9'
,
SQLAnywherePlatform
::
class
],
[
'17'
,
SQLAnywherePlatform
::
class
],
[
'16'
,
SQLAnywhere
16
Platform
::
class
],
[
'16.0'
,
SQLAnywhere
16
Platform
::
class
],
[
'16.0.0'
,
SQLAnywhere
16
Platform
::
class
],
[
'16.0.0.0'
,
SQLAnywhere
16
Platform
::
class
],
[
'16.1.2.3'
,
SQLAnywhere
16
Platform
::
class
],
[
'16.9.9.9'
,
SQLAnywhere
16
Platform
::
class
],
[
'17'
,
SQLAnywhere
16
Platform
::
class
],
];
}
...
...
tests/Doctrine/Tests/DBAL/Driver/AbstractSQLServerDriverTest.php
View file @
7811e4ee
...
...
@@ -8,7 +8,7 @@ use Doctrine\DBAL\Connection;
use
Doctrine\DBAL\Driver
;
use
Doctrine\DBAL\Driver\AbstractSQLServerDriver
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\SQLServerPlatform
;
use
Doctrine\DBAL\Platforms\SQLServer
2012
Platform
;
use
Doctrine\DBAL\Schema\AbstractSchemaManager
;
use
Doctrine\DBAL\Schema\SQLServerSchemaManager
;
...
...
@@ -21,7 +21,7 @@ class AbstractSQLServerDriverTest extends AbstractDriverTest
protected
function
createPlatform
()
:
AbstractPlatform
{
return
new
SQLServerPlatform
();
return
new
SQLServer
2012
Platform
();
}
protected
function
createSchemaManager
(
Connection
$connection
)
:
AbstractSchemaManager
...
...
@@ -35,7 +35,7 @@ class AbstractSQLServerDriverTest extends AbstractDriverTest
protected
function
getDatabasePlatformsForVersions
()
:
array
{
return
[
[
'12'
,
SQLServerPlatform
::
class
],
[
'12'
,
SQLServer
2012
Platform
::
class
],
];
}
}
tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php
View file @
7811e4ee
...
...
@@ -11,7 +11,7 @@ use Doctrine\DBAL\Driver\PDOConnection;
use
Doctrine\DBAL\DriverManager
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\SqlitePlatform
;
use
Doctrine\DBAL\Platforms\SQLServerPlatform
;
use
Doctrine\DBAL\Platforms\SQLServer
2012
Platform
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
Doctrine\Tests\TestUtil
;
use
Error
;
...
...
@@ -365,7 +365,7 @@ class ConnectionTest extends DbalFunctionalTestCase
$platform
=
$this
->
connection
->
getDatabasePlatform
();
if
(
$platform
instanceof
SqlitePlatform
||
$platform
instanceof
SQLServerPlatform
)
{
||
$platform
instanceof
SQLServer
2012
Platform
)
{
self
::
markTestSkipped
(
'The platform does not support persistent connections'
);
}
...
...
tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php
View file @
7811e4ee
...
...
@@ -6,7 +6,7 @@ namespace Doctrine\Tests\DBAL\Functional\Driver;
use
Doctrine\DBAL\DriverManager
;
use
Doctrine\DBAL\FetchMode
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
function
extension_loaded
;
...
...
@@ -20,7 +20,7 @@ class PDOPgsqlConnectionTest extends DbalFunctionalTestCase
parent
::
setUp
();
if
(
$this
->
connection
->
getDatabasePlatform
()
instanceof
PostgreS
ql
Platform
)
{
if
(
$this
->
connection
->
getDatabasePlatform
()
instanceof
PostgreS
QL94
Platform
)
{
return
;
}
...
...
tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php
View file @
7811e4ee
...
...
@@ -9,7 +9,7 @@ use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use
Doctrine\DBAL\DriverManager
;
use
Doctrine\DBAL\Exception
;
use
Doctrine\DBAL\Platforms\MySqlPlatform
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\DBAL\Platforms\SqlitePlatform
;
use
Doctrine\DBAL\Schema\Schema
;
use
Doctrine\DBAL\Schema\Table
;
...
...
@@ -219,7 +219,7 @@ EOT
$this
->
markTestSkipped
(
'Only skipped if platform is not sqlite'
);
}
if
(
$platform
instanceof
PostgreS
ql
Platform
&&
isset
(
$params
[
'password'
]))
{
if
(
$platform
instanceof
PostgreS
QL94
Platform
&&
isset
(
$params
[
'password'
]))
{
$this
->
markTestSkipped
(
'Does not work on Travis'
);
}
...
...
tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/PostgreSQL.php
View file @
7811e4ee
...
...
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace
Doctrine\Tests\DBAL\Functional\Platform\ColumnTest
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\Tests\DBAL\Functional\Platform\ColumnTest
;
final
class
PostgreSQL
extends
ColumnTest
...
...
@@ -13,6 +13,6 @@ final class PostgreSQL extends ColumnTest
{
parent
::
setUp
();
$this
->
requirePlatform
(
PostgreS
ql
Platform
::
class
);
$this
->
requirePlatform
(
PostgreS
QL94
Platform
::
class
);
}
}
tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/SQLServer.php
View file @
7811e4ee
...
...
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace
Doctrine\Tests\DBAL\Functional\Platform\ColumnTest
;
use
Doctrine\DBAL\Platforms\SQLServerPlatform
;
use
Doctrine\DBAL\Platforms\SQLServer
2012
Platform
;
use
Doctrine\Tests\DBAL\Functional\Platform\ColumnTest
;
final
class
SQLServer
extends
ColumnTest
...
...
@@ -13,7 +13,7 @@ final class SQLServer extends ColumnTest
{
parent
::
setUp
();
$this
->
requirePlatform
(
SQLServerPlatform
::
class
);
$this
->
requirePlatform
(
SQLServer
2012
Platform
::
class
);
}
public
function
testVariableLengthStringNoLength
()
:
void
...
...
tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php
View file @
7811e4ee
...
...
@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace
Doctrine\Tests\DBAL\Functional\Schema
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\DBAL\Schema
;
use
Doctrine\DBAL\Schema\Comparator
;
use
Doctrine\DBAL\Schema\ForeignKeyConstraint
;
...
...
@@ -417,7 +417,7 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public
function
testJsonbColumn
()
:
void
{
if
(
!
$this
->
schemaManager
->
getDatabasePlatform
()
instanceof
PostgreS
ql
Platform
)
{
if
(
!
$this
->
schemaManager
->
getDatabasePlatform
()
instanceof
PostgreS
QL94
Platform
)
{
$this
->
markTestSkipped
(
'Requires PostgresSQL 9.4+'
);
return
;
...
...
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreS
ql
PlatformTestCase.php
→
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreS
QL
PlatformTestCase.php
View file @
7811e4ee
...
...
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace
Doctrine\Tests\DBAL\Platforms
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\DBAL\Schema\Column
;
use
Doctrine\DBAL\Schema\ColumnDiff
;
use
Doctrine\DBAL\Schema\Comparator
;
...
...
@@ -18,9 +18,9 @@ use UnexpectedValueException;
use
function
assert
;
use
function
sprintf
;
abstract
class
AbstractPostgreS
ql
PlatformTestCase
extends
AbstractPlatformTestCase
abstract
class
AbstractPostgreS
QL
PlatformTestCase
extends
AbstractPlatformTestCase
{
/** @var PostgreS
ql
Platform */
/** @var PostgreS
QL94
Platform */
protected
$platform
;
public
function
getGenerateTableSql
()
:
string
...
...
@@ -921,7 +921,7 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
*/
public
function
testReturnsDisallowDatabaseConnectionsSQL
()
:
void
{
assert
(
$this
->
platform
instanceof
PostgreS
ql
Platform
);
assert
(
$this
->
platform
instanceof
PostgreS
QL94
Platform
);
self
::
assertSame
(
"UPDATE pg_database SET datallowconn = 'false' WHERE datname = 'foo'"
,
...
...
@@ -934,7 +934,7 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
*/
public
function
testReturnsCloseActiveDatabaseConnectionsSQL
()
:
void
{
assert
(
$this
->
platform
instanceof
PostgreS
ql
Platform
);
assert
(
$this
->
platform
instanceof
PostgreS
QL94
Platform
);
self
::
assertSame
(
"SELECT pg_terminate_backend(procpid) FROM pg_stat_activity WHERE datname = 'foo'"
,
...
...
@@ -1024,7 +1024,7 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
*/
public
function
testQuotesDatabaseNameInCloseActiveDatabaseConnectionsSQL
()
:
void
{
assert
(
$this
->
platform
instanceof
PostgreS
ql
Platform
);
assert
(
$this
->
platform
instanceof
PostgreS
QL94
Platform
);
self
::
assertStringContainsStringIgnoringCase
(
"'Foo''Bar
\\
'"
,
...
...
tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php
View file @
7811e4ee
...
...
@@ -6,7 +6,7 @@ namespace Doctrine\Tests\DBAL\Platforms;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Exception\ColumnLengthRequired
;
use
Doctrine\DBAL\Platforms\SQLServerPlatform
;
use
Doctrine\DBAL\Platforms\SQLServer
2012
Platform
;
use
Doctrine\DBAL\Schema\Column
;
use
Doctrine\DBAL\Schema\ColumnDiff
;
use
Doctrine\DBAL\Schema\Index
;
...
...
@@ -1096,7 +1096,7 @@ abstract class AbstractSQLServerPlatformTestCase extends AbstractPlatformTestCas
*/
public
function
testGeneratesIdentifierNamesInDefaultConstraintDeclarationSQL
(
string
$table
,
array
$column
,
string
$expectedSql
)
:
void
{
assert
(
$this
->
platform
instanceof
SQLServerPlatform
);
assert
(
$this
->
platform
instanceof
SQLServer
2012
Platform
);
self
::
assertSame
(
$expectedSql
,
$this
->
platform
->
getDefaultConstraintDeclarationSQL
(
$table
,
$column
));
}
...
...
tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php
View file @
7811e4ee
...
...
@@ -7,7 +7,7 @@ namespace Doctrine\Tests\DBAL\Platforms;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
class
PostgreSQL100PlatformTest
extends
PostgreS
ql
PlatformTest
class
PostgreSQL100PlatformTest
extends
PostgreS
QL94
PlatformTest
{
public
function
createPlatform
()
:
AbstractPlatform
{
...
...
tests/Doctrine/Tests/DBAL/Platforms/PostgreS
ql
PlatformTest.php
→
tests/Doctrine/Tests/DBAL/Platforms/PostgreS
QL94
PlatformTest.php
View file @
7811e4ee
...
...
@@ -5,16 +5,16 @@ declare(strict_types=1);
namespace
Doctrine\Tests\DBAL\Platforms
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\PostgreS
ql
Platform
;
use
Doctrine\DBAL\Platforms\PostgreS
QL94
Platform
;
use
Doctrine\DBAL\Schema\Table
;
use
Doctrine\DBAL\Types\Types
;
use
function
assert
;
class
PostgreS
qlPlatformTest
extends
AbstractPostgreSql
PlatformTestCase
class
PostgreS
QL94PlatformTest
extends
AbstractPostgreSQL
PlatformTestCase
{
public
function
createPlatform
()
:
AbstractPlatform
{
return
new
PostgreS
ql
Platform
();
return
new
PostgreS
QL94
Platform
();
}
public
function
testSupportsPartialIndexes
()
:
void
...
...
@@ -97,7 +97,7 @@ class PostgreSqlPlatformTest extends AbstractPostgreSqlPlatformTestCase
*/
public
function
testReturnsCloseActiveDatabaseConnectionsSQL
()
:
void
{
assert
(
$this
->
platform
instanceof
PostgreS
ql
Platform
);
assert
(
$this
->
platform
instanceof
PostgreS
QL94
Platform
);
self
::
assertSame
(
"SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'foo'"
,
...
...
tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php
→
tests/Doctrine/Tests/DBAL/Platforms/SQLAnywhere
16
PlatformTest.php
View file @
7811e4ee
...
...
@@ -8,7 +8,7 @@ use Doctrine\DBAL\DBALException;
use
Doctrine\DBAL\Exception\ColumnLengthRequired
;
use
Doctrine\DBAL\LockMode
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\SQLAnywherePlatform
;
use
Doctrine\DBAL\Platforms\SQLAnywhere
16
Platform
;
use
Doctrine\DBAL\Platforms\TrimMode
;
use
Doctrine\DBAL\Schema\Column
;
use
Doctrine\DBAL\Schema\ColumnDiff
;
...
...
@@ -27,14 +27,14 @@ use function mt_rand;
use
function
strlen
;
use
function
substr
;
class
SQLAnywherePlatformTest
extends
AbstractPlatformTestCase
class
SQLAnywhere
16
PlatformTest
extends
AbstractPlatformTestCase
{
/** @var SQLAnywherePlatform */
/** @var SQLAnywhere
16
Platform */
protected
$platform
;
public
function
createPlatform
()
:
AbstractPlatform
{
return
new
SQLAnywherePlatform
();
return
new
SQLAnywhere
16
Platform
();
}
/**
...
...
@@ -414,7 +414,7 @@ class SQLAnywherePlatformTest extends AbstractPlatformTestCase
$this
->
platform
->
getForeignKeyDeclarationSQL
(
new
ForeignKeyConstraint
([
'a'
,
'b'
],
'foreign_table'
,
[
'c'
,
'd'
],
'fk'
,
[
'notnull'
=>
true
,
'match'
=>
SQLAnywherePlatform
::
FOREIGN_KEY_MATCH_SIMPLE_UNIQUE
,
'match'
=>
SQLAnywhere
16
Platform
::
FOREIGN_KEY_MATCH_SIMPLE_UNIQUE
,
'onUpdate'
=>
'CASCADE'
,
'onDelete'
=>
'SET NULL'
,
'check_on_commit'
=>
true
,
...
...
tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php
→
tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatform
2012
Test.php
View file @
7811e4ee
...
...
@@ -6,13 +6,13 @@ namespace Doctrine\Tests\DBAL\Platforms;
use
Doctrine\DBAL\LockMode
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
use
Doctrine\DBAL\Platforms\SQLServerPlatform
;
use
Doctrine\DBAL\Platforms\SQLServer
2012
Platform
;
class
SQLServerPlatformTest
extends
AbstractSQLServerPlatformTestCase
class
SQLServerPlatform
2012
Test
extends
AbstractSQLServerPlatformTestCase
{
public
function
createPlatform
()
:
AbstractPlatform
{
return
new
SQLServerPlatform
();
return
new
SQLServer
2012
Platform
();
}
/**
...
...
tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php
View file @
7811e4ee
...
...
@@ -6,7 +6,7 @@ namespace Doctrine\Tests\DBAL\Schema;
use
Doctrine\DBAL\Platforms\MySqlPlatform
;
use
Doctrine\DBAL\Platforms\SqlitePlatform
;
use
Doctrine\DBAL\Platforms\SQLServerPlatform
;
use
Doctrine\DBAL\Platforms\SQLServer
2012
Platform
;
use
Doctrine\DBAL\Schema\Column
;
use
Doctrine\DBAL\Schema\Exception\UnknownColumnOption
;
use
Doctrine\DBAL\Types\Type
;
...
...
@@ -120,7 +120,7 @@ class ColumnTest extends TestCase
$column
=
new
Column
(
'[bar]'
,
$string
);
$sqlServerPlatform
=
new
SQLServerPlatform
();
$sqlServerPlatform
=
new
SQLServer
2012
Platform
();
self
::
assertEquals
(
'bar'
,
$column
->
getName
());
self
::
assertEquals
(
'[bar]'
,
$column
->
getQuotedName
(
$sqlServerPlatform
));
...
...
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