A driver cannot throw a DBAL exception

parent c197e485
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
The following driver-level methods are allowed to throw a Driver\Exception: The following driver-level methods are allowed to throw a Driver\Exception:
- `Connection::prepare()` - `Connection::prepare()`
- `Connection::query()`
- `Connection::exec()`
- `Connection::lastInsertId()` - `Connection::lastInsertId()`
- `Connection::beginTransaction()` - `Connection::beginTransaction()`
- `Connection::commit()` - `Connection::commit()`
...@@ -15,6 +17,8 @@ The following driver-level methods are allowed to throw a Driver\Exception: ...@@ -15,6 +17,8 @@ The following driver-level methods are allowed to throw a Driver\Exception:
- `Result::rowCount()` - `Result::rowCount()`
- `Result::columnCount()` - `Result::columnCount()`
The driver-level implementations of `Connection::query()` and `Connection::exec()` may no longer throw a `DBALException`.
## The `ExceptionConverterDriver` interface is removed ## The `ExceptionConverterDriver` interface is removed
All drivers must implement the `convertException()` method which is now part of the `Driver` interface. All drivers must implement the `convertException()` method which is now part of the `Driver` interface.
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace Doctrine\DBAL\Driver; namespace Doctrine\DBAL\Driver;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
/** /**
...@@ -23,7 +22,7 @@ interface Connection ...@@ -23,7 +22,7 @@ interface Connection
/** /**
* Executes an SQL statement, returning a result set as a Statement object. * Executes an SQL statement, returning a result set as a Statement object.
* *
* @throws DBALException * @throws Exception
*/ */
public function query(string $sql): Result; public function query(string $sql): Result;
...@@ -40,7 +39,7 @@ interface Connection ...@@ -40,7 +39,7 @@ interface Connection
/** /**
* Executes an SQL statement and return the number of affected rows. * Executes an SQL statement and return the number of affected rows.
* *
* @throws DBALException * @throws Exception
*/ */
public function exec(string $statement): int; public function exec(string $statement): int;
......
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