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
c5a7b926
Unverified
Commit
c5a7b926
authored
Nov 25, 2019
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VersionAwarePlatformDriver now extends Driver
parent
ad96d888
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
13 deletions
+13
-13
UPGRADE.md
UPGRADE.md
+4
-0
AbstractMySQLDriver.php
lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
+1
-2
AbstractPostgreSQLDriver.php
lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php
+1
-2
AbstractSQLAnywhereDriver.php
lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php
+1
-2
AbstractSQLServerDriver.php
lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php
+1
-2
VersionAwarePlatformDriver.php
lib/Doctrine/DBAL/VersionAwarePlatformDriver.php
+1
-1
ConnectionTest.php
tests/Doctrine/Tests/DBAL/ConnectionTest.php
+4
-4
No files found.
UPGRADE.md
View file @
c5a7b926
# Upgrade to 3.0
# Upgrade to 3.0
## BC BREAK: VersionAwarePlatformDriver interface now extends Driver
All implementations of the
`VersionAwarePlatformDriver`
interface have to implement the methods defined in the
`Driver`
interface as well.
## BC BREAK: Removed Doctrine\DBAL\Version
## BC BREAK: Removed Doctrine\DBAL\Version
The
`Doctrine\DBAL\Version`
class is no longer available: please refrain from checking the DBAL version at runtime.
The
`Doctrine\DBAL\Version`
class is no longer available: please refrain from checking the DBAL version at runtime.
...
...
lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
View file @
c5a7b926
...
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Driver;
...
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Driver;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Driver
;
use
Doctrine\DBAL\Exception
;
use
Doctrine\DBAL\Exception
;
use
Doctrine\DBAL\Platforms\MariaDb1027Platform
;
use
Doctrine\DBAL\Platforms\MariaDb1027Platform
;
use
Doctrine\DBAL\Platforms\MySQL57Platform
;
use
Doctrine\DBAL\Platforms\MySQL57Platform
;
...
@@ -19,7 +18,7 @@ use function version_compare;
...
@@ -19,7 +18,7 @@ use function version_compare;
/**
/**
* Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for MySQL based drivers.
* Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for MySQL based drivers.
*/
*/
abstract
class
AbstractMySQLDriver
implements
Driver
,
ExceptionConverterDriver
,
VersionAwarePlatformDriver
abstract
class
AbstractMySQLDriver
implements
ExceptionConverterDriver
,
VersionAwarePlatformDriver
{
{
/**
/**
* {@inheritdoc}
* {@inheritdoc}
...
...
lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php
View file @
c5a7b926
...
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Driver;
...
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Driver;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Driver
;
use
Doctrine\DBAL\Exception
;
use
Doctrine\DBAL\Exception
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL100Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL91Platform
;
use
Doctrine\DBAL\Platforms\PostgreSQL91Platform
;
...
@@ -20,7 +19,7 @@ use function version_compare;
...
@@ -20,7 +19,7 @@ use function version_compare;
/**
/**
* Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for PostgreSQL based drivers.
* Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for PostgreSQL based drivers.
*/
*/
abstract
class
AbstractPostgreSQLDriver
implements
Driver
,
ExceptionConverterDriver
,
VersionAwarePlatformDriver
abstract
class
AbstractPostgreSQLDriver
implements
ExceptionConverterDriver
,
VersionAwarePlatformDriver
{
{
/**
/**
* {@inheritdoc}
* {@inheritdoc}
...
...
lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php
View file @
c5a7b926
...
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Driver;
...
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Driver;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Driver
;
use
Doctrine\DBAL\Exception
;
use
Doctrine\DBAL\Exception
;
use
Doctrine\DBAL\Platforms\SQLAnywhere11Platform
;
use
Doctrine\DBAL\Platforms\SQLAnywhere11Platform
;
use
Doctrine\DBAL\Platforms\SQLAnywhere12Platform
;
use
Doctrine\DBAL\Platforms\SQLAnywhere12Platform
;
...
@@ -18,7 +17,7 @@ use function version_compare;
...
@@ -18,7 +17,7 @@ use function version_compare;
/**
/**
* Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SAP Sybase SQL Anywhere based drivers.
* Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SAP Sybase SQL Anywhere based drivers.
*/
*/
abstract
class
AbstractSQLAnywhereDriver
implements
Driver
,
ExceptionConverterDriver
,
VersionAwarePlatformDriver
abstract
class
AbstractSQLAnywhereDriver
implements
ExceptionConverterDriver
,
VersionAwarePlatformDriver
{
{
/**
/**
* {@inheritdoc}
* {@inheritdoc}
...
...
lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php
View file @
c5a7b926
...
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Driver;
...
@@ -4,7 +4,6 @@ namespace Doctrine\DBAL\Driver;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Driver
;
use
Doctrine\DBAL\Platforms\SQLServer2005Platform
;
use
Doctrine\DBAL\Platforms\SQLServer2005Platform
;
use
Doctrine\DBAL\Platforms\SQLServer2008Platform
;
use
Doctrine\DBAL\Platforms\SQLServer2008Platform
;
use
Doctrine\DBAL\Platforms\SQLServer2012Platform
;
use
Doctrine\DBAL\Platforms\SQLServer2012Platform
;
...
@@ -17,7 +16,7 @@ use function version_compare;
...
@@ -17,7 +16,7 @@ use function version_compare;
/**
/**
* Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for Microsoft SQL Server based drivers.
* Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for Microsoft SQL Server based drivers.
*/
*/
abstract
class
AbstractSQLServerDriver
implements
Driver
,
VersionAwarePlatformDriver
abstract
class
AbstractSQLServerDriver
implements
VersionAwarePlatformDriver
{
{
/**
/**
* {@inheritdoc}
* {@inheritdoc}
...
...
lib/Doctrine/DBAL/VersionAwarePlatformDriver.php
View file @
c5a7b926
...
@@ -12,7 +12,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
...
@@ -12,7 +12,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
* This interface should be implemented by drivers that are capable to do this
* This interface should be implemented by drivers that are capable to do this
* distinction.
* distinction.
*/
*/
interface
VersionAwarePlatformDriver
interface
VersionAwarePlatformDriver
extends
Driver
{
{
/**
/**
* Factory method for creating the appropriate platform instance for the given version.
* Factory method for creating the appropriate platform instance for the given version.
...
...
tests/Doctrine/Tests/DBAL/ConnectionTest.php
View file @
c5a7b926
...
@@ -714,8 +714,8 @@ class ConnectionTest extends DbalTestCase
...
@@ -714,8 +714,8 @@ class ConnectionTest extends DbalTestCase
*/
*/
public
function
testPlatformDetectionIsTriggerOnlyOnceOnRetrievingPlatform
()
:
void
public
function
testPlatformDetectionIsTriggerOnlyOnceOnRetrievingPlatform
()
:
void
{
{
/** @var
Driver|
VersionAwarePlatformDriver|MockObject $driverMock */
/** @var VersionAwarePlatformDriver|MockObject $driverMock */
$driverMock
=
$this
->
createMock
(
[
Driver
::
class
,
VersionAwarePlatformDriver
::
class
]
);
$driverMock
=
$this
->
createMock
(
VersionAwarePlatformDriver
::
class
);
/** @var ServerInfoAwareConnection|MockObject $driverConnectionMock */
/** @var ServerInfoAwareConnection|MockObject $driverConnectionMock */
$driverConnectionMock
=
$this
->
createMock
(
ServerInfoAwareConnection
::
class
);
$driverConnectionMock
=
$this
->
createMock
(
ServerInfoAwareConnection
::
class
);
...
@@ -843,8 +843,8 @@ class ConnectionTest extends DbalTestCase
...
@@ -843,8 +843,8 @@ class ConnectionTest extends DbalTestCase
*/
*/
public
function
testRethrowsOriginalExceptionOnDeterminingPlatformWhenConnectingToNonExistentDatabase
()
:
void
public
function
testRethrowsOriginalExceptionOnDeterminingPlatformWhenConnectingToNonExistentDatabase
()
:
void
{
{
/** @var
Driver|
VersionAwarePlatformDriver|MockObject $driverMock */
/** @var VersionAwarePlatformDriver|MockObject $driverMock */
$driverMock
=
$this
->
createMock
(
[
Driver
::
class
,
VersionAwarePlatformDriver
::
class
]
);
$driverMock
=
$this
->
createMock
(
VersionAwarePlatformDriver
::
class
);
$connection
=
new
Connection
([
'dbname'
=>
'foo'
],
$driverMock
);
$connection
=
new
Connection
([
'dbname'
=>
'foo'
],
$driverMock
);
$originalException
=
new
Exception
(
'Original exception'
);
$originalException
=
new
Exception
(
'Original exception'
);
...
...
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