PingableConnection and ServerInfoAwareConnection now extend Connection

parent c5a7b926
# Upgrade to 3.0
## BC BREAK: PingableConnection and ServerInfoAwareConnection interfaces now extend Connection
All implementations of the `PingableConnection` and `ServerInfoAwareConnection` interfaces have to implement the methods defined in the `Connection` interface as well.
## 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.
......
......@@ -2,7 +2,6 @@
namespace Doctrine\DBAL\Driver\IBMDB2;
use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\ResultStatement;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use Doctrine\DBAL\Driver\Statement as DriverStatement;
......@@ -25,7 +24,7 @@ use function db2_rollback;
use function db2_server_info;
use function db2_stmt_errormsg;
class DB2Connection implements Connection, ServerInfoAwareConnection
class DB2Connection implements ServerInfoAwareConnection
{
/** @var resource */
private $conn = null;
......
......@@ -2,7 +2,6 @@
namespace Doctrine\DBAL\Driver\Mysqli;
use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\PingableConnection;
use Doctrine\DBAL\Driver\ResultStatement;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
......@@ -28,7 +27,7 @@ use function set_error_handler;
use function sprintf;
use function stripos;
class MysqliConnection implements Connection, PingableConnection, ServerInfoAwareConnection
class MysqliConnection implements PingableConnection, ServerInfoAwareConnection
{
/**
* Name of the option to set connection flags
......
......@@ -11,7 +11,7 @@ use function assert;
*
* Used by all PDO-based drivers.
*/
class PDOConnection implements Connection, ServerInfoAwareConnection
class PDOConnection implements ServerInfoAwareConnection
{
/** @var PDO */
private $connection;
......
......@@ -5,7 +5,7 @@ namespace Doctrine\DBAL\Driver;
/**
* An interface for connections which support a "native" ping method.
*/
interface PingableConnection
interface PingableConnection extends Connection
{
/**
* Pings the database server to determine if the connection is still
......
......@@ -2,7 +2,6 @@
namespace Doctrine\DBAL\Driver\SQLAnywhere;
use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\ResultStatement;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use Doctrine\DBAL\Driver\Statement as DriverStatement;
......@@ -27,7 +26,7 @@ use function sasql_set_option;
/**
* SAP Sybase SQL Anywhere implementation of the Connection interface.
*/
class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection
class SQLAnywhereConnection implements ServerInfoAwareConnection
{
/** @var resource The SQL Anywhere connection resource. */
private $connection;
......
......@@ -2,7 +2,6 @@
namespace Doctrine\DBAL\Driver\SQLSrv;
use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\ResultStatement;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use Doctrine\DBAL\Driver\Statement as DriverStatement;
......@@ -25,7 +24,7 @@ use function str_replace;
/**
* SQL Server implementation for the Connection interface.
*/
class SQLSrvConnection implements Connection, ServerInfoAwareConnection
class SQLSrvConnection implements ServerInfoAwareConnection
{
/** @var resource */
protected $conn;
......
......@@ -5,7 +5,7 @@ namespace Doctrine\DBAL\Driver;
/**
* Contract for a connection that is able to provide information about the server it is connected to.
*/
interface ServerInfoAwareConnection
interface ServerInfoAwareConnection extends Connection
{
/**
* Returns the version number of the database server connected to.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment