Skip to content

Commit

Permalink
Deprecate DriverException::getErrorCode()
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Jun 26, 2020
1 parent d7b24f1 commit f01c923
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 f01c923

Please sign in to comment.