Unverified Commit d08a41e9 authored by Sergei Morozov's avatar Sergei Morozov Committed by GitHub

Merge pull request #4020 from morozov/missing-deprecations

Deprecated Connection::project(), Statement::errorCode() and errorInfo()
parents f3e8dfb0 3c72aeb7
# Upgrade to 2.11 # Upgrade to 2.11
## Deprecated `Connection::project()`
The `Connection::project()` method is deprecated. Implement data transformation outside of DBAL.
## Deprecated `Statement::errorCode()` and `errorInfo()`
The `Statement::errorCode()` and `errorInfo()` methods are deprecated. The error information is available via exceptions.
## Deprecated `EchoSQLLogger` ## Deprecated `EchoSQLLogger`
The `EchoSQLLogger` is has been deprecated. Implement your logger with the desired logic. The `EchoSQLLogger` class is deprecated. Implement your logger with the desired logic.
## Deprecated database platforms: ## Deprecated database platforms:
......
...@@ -973,6 +973,8 @@ class Connection implements DriverConnection ...@@ -973,6 +973,8 @@ class Connection implements DriverConnection
* Executes an, optionally parametrized, SQL query and returns the result, * Executes an, optionally parametrized, SQL query and returns the result,
* applying a given projection/transformation function on each row of the result. * applying a given projection/transformation function on each row of the result.
* *
* @deprecated
*
* @param string $query The SQL query to execute. * @param string $query The SQL query to execute.
* @param mixed[] $params The parameters, if any. * @param mixed[] $params The parameters, if any.
* @param Closure $function The transformation function that is applied on each row. * @param Closure $function The transformation function that is applied on each row.
...@@ -1123,6 +1125,8 @@ class Connection implements DriverConnection ...@@ -1123,6 +1125,8 @@ class Connection implements DriverConnection
/** /**
* Fetches the SQLSTATE associated with the last database operation. * Fetches the SQLSTATE associated with the last database operation.
* *
* @deprecated The error information is available via exceptions.
*
* @return string|null The last error code. * @return string|null The last error code.
*/ */
public function errorCode() public function errorCode()
...@@ -1132,6 +1136,8 @@ class Connection implements DriverConnection ...@@ -1132,6 +1136,8 @@ class Connection implements DriverConnection
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -80,6 +80,8 @@ interface Connection ...@@ -80,6 +80,8 @@ interface Connection
/** /**
* Returns the error code associated with the last operation on the database handle. * Returns the error code associated with the last operation on the database handle.
* *
* @deprecated The error information is available via exceptions.
*
* @return string|null The error code, or null if no operation has been run on the database handle. * @return string|null The error code, or null if no operation has been run on the database handle.
*/ */
public function errorCode(); public function errorCode();
...@@ -87,6 +89,8 @@ interface Connection ...@@ -87,6 +89,8 @@ interface Connection
/** /**
* Returns extended error information associated with the last operation on the database handle. * Returns extended error information associated with the last operation on the database handle.
* *
* @deprecated The error information is available via exceptions.
*
* @return mixed[] * @return mixed[]
*/ */
public function errorInfo(); public function errorInfo();
......
...@@ -180,6 +180,8 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -180,6 +180,8 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -188,6 +190,8 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -188,6 +190,8 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -167,6 +167,8 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -167,6 +167,8 @@ class DB2Statement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -175,6 +177,8 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -175,6 +177,8 @@ class DB2Statement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -200,6 +200,8 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -200,6 +200,8 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -208,6 +210,8 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -208,6 +210,8 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -393,6 +393,8 @@ class MysqliStatement implements IteratorAggregate, Statement ...@@ -393,6 +393,8 @@ class MysqliStatement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -401,6 +403,8 @@ class MysqliStatement implements IteratorAggregate, Statement ...@@ -401,6 +403,8 @@ class MysqliStatement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -216,6 +216,8 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection ...@@ -216,6 +216,8 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -229,6 +231,8 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection ...@@ -229,6 +231,8 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -352,6 +352,8 @@ class OCI8Statement implements IteratorAggregate, Statement ...@@ -352,6 +352,8 @@ class OCI8Statement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -365,6 +367,8 @@ class OCI8Statement implements IteratorAggregate, Statement ...@@ -365,6 +367,8 @@ class OCI8Statement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -90,6 +90,8 @@ class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection ...@@ -90,6 +90,8 @@ class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -98,6 +100,8 @@ class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection ...@@ -98,6 +100,8 @@ class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -152,6 +152,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement ...@@ -152,6 +152,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -160,6 +162,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement ...@@ -160,6 +162,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -182,6 +182,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection ...@@ -182,6 +182,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -195,6 +197,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection ...@@ -195,6 +197,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -216,6 +216,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement ...@@ -216,6 +216,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -229,6 +231,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement ...@@ -229,6 +231,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -61,6 +61,8 @@ interface Statement extends ResultStatement ...@@ -61,6 +61,8 @@ interface Statement extends ResultStatement
/** /**
* Fetches the SQLSTATE associated with the last operation on the statement handle. * Fetches the SQLSTATE associated with the last operation on the statement handle.
* *
* @deprecated The error information is available via exceptions.
*
* @see Doctrine_Adapter_Interface::errorCode() * @see Doctrine_Adapter_Interface::errorCode()
* *
* @return string|int|bool The error code string. * @return string|int|bool The error code string.
...@@ -70,6 +72,8 @@ interface Statement extends ResultStatement ...@@ -70,6 +72,8 @@ interface Statement extends ResultStatement
/** /**
* Fetches extended error information associated with the last operation on the statement handle. * Fetches extended error information associated with the last operation on the statement handle.
* *
* @deprecated The error information is available via exceptions.
*
* @return mixed[] The error info array. * @return mixed[] The error info array.
*/ */
public function errorInfo(); public function errorInfo();
......
...@@ -81,6 +81,8 @@ class Statement implements IteratorAggregate, DriverStatement ...@@ -81,6 +81,8 @@ class Statement implements IteratorAggregate, DriverStatement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorCode() public function errorCode()
{ {
...@@ -91,6 +93,8 @@ class Statement implements IteratorAggregate, DriverStatement ...@@ -91,6 +93,8 @@ class Statement implements IteratorAggregate, DriverStatement
/** /**
* {@inheritdoc} * {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
...@@ -198,6 +198,8 @@ class Statement implements IteratorAggregate, DriverStatement ...@@ -198,6 +198,8 @@ class Statement implements IteratorAggregate, DriverStatement
/** /**
* Fetches the SQLSTATE associated with the last operation on the statement. * Fetches the SQLSTATE associated with the last operation on the statement.
* *
* @deprecated The error information is available via exceptions.
*
* @return string|int|bool * @return string|int|bool
*/ */
public function errorCode() public function errorCode()
...@@ -207,6 +209,8 @@ class Statement implements IteratorAggregate, DriverStatement ...@@ -207,6 +209,8 @@ class Statement implements IteratorAggregate, DriverStatement
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @deprecated The error information is available via exceptions.
*/ */
public function errorInfo() public function errorInfo()
{ {
......
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