Skip to content

Commit

Permalink
Deprecate SQLSrvStatement::LAST_INSERT_ID_SQL constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwage committed May 8, 2019
1 parent e4978c2 commit 1a3c9b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Some of the constants were renamed in the process:
* `DATETIMETZ` -> `DATETIMETZ_MUTABLE`
* `TIME` -> `TIME_MUTABLE`

## Deprecated `SQLSrvStatement::LAST_INSERT_ID_SQL` constant

The `Doctrine\DBAL\Driver\SQLSrv\SQLSrvStatement::LAST_INSERT_ID_SQL` constant has been deprecated and will be made private in 3.0.

# Upgrade to 2.9

## Deprecated `Statement::fetchColumn()` with an invalid index
Expand Down Expand Up @@ -92,7 +96,7 @@ This method now throws SPL ``UnexpectedValueException`` instead of accidentally

## Doctrine\DBAL\Connection::TRANSACTION_* constants deprecated

``Doctrine\DBAL\Connection::TRANSACTION_*`` were moved into ``Doctrine\DBAL\TransactionIsolationLevel`` class without the ``TRANSACTION_`` prefix.
``Doctrine\DBAL\Connection::TRANSACTION_*`` were moved into ``Doctrine\DBAL\TransactionIsolationLevel`` class without the ``TRANSACTION_`` prefix.

## DEPRECATION: direct usage of the PDO APIs in the DBAL API

Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement

/**
* Append to any INSERT query to retrieve the last insert id.
*
* @deprecated This constant has been deprecated and will be made private in 3.0
*/
public const LAST_INSERT_ID_SQL = ';SELECT SCOPE_IDENTITY() AS LastInsertId;';

Expand Down

0 comments on commit 1a3c9b7

Please sign in to comment.