Skip to content

Commit

Permalink
Merge pull request #4112 from morozov/deprecate-driver-exception-erro…
Browse files Browse the repository at this point in the history
…r-code

Deprecate DriverException::getErrorCode()
  • Loading branch information
morozov committed Jun 26, 2020
2 parents d7b24f1 + f01c923 commit 1c42543
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Upgrade to 2.11

## `DriverException::getErrorCode()` is deprecated

The `DriverException::getErrorCode()` is deprecated as redundant and inconsistently supported by drivers. Use `::getCode()` or `::getSQLState()` instead.

## Non-interface driver methods have been marked internal

The non-interface methods of driver-level classes have been marked internal:
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ interface Exception extends Throwable
/**
* Returns the driver specific error code if available.
*
* @deprecated Use {@link getCode()} or {@link getSQLState()} instead
*
* Returns null if no driver specific error code is available
* for the error raised by the driver.
*
Expand Down

0 comments on commit 1c42543

Please sign in to comment.