Skip to content

Commit 9e60740

Browse files
authored
Merge pull request #3542 from jwage/deprecate-sql-srv-constant
Deprecate SQLSrvStatement::LAST_INSERT_ID_SQL constant.
2 parents e4978c2 + 1a3c9b7 commit 9e60740

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

UPGRADE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Some of the constants were renamed in the process:
2323
* `DATETIMETZ` -> `DATETIMETZ_MUTABLE`
2424
* `TIME` -> `TIME_MUTABLE`
2525

26+
## Deprecated `SQLSrvStatement::LAST_INSERT_ID_SQL` constant
27+
28+
The `Doctrine\DBAL\Driver\SQLSrv\SQLSrvStatement::LAST_INSERT_ID_SQL` constant has been deprecated and will be made private in 3.0.
29+
2630
# Upgrade to 2.9
2731

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

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

95-
``Doctrine\DBAL\Connection::TRANSACTION_*`` were moved into ``Doctrine\DBAL\TransactionIsolationLevel`` class without the ``TRANSACTION_`` prefix.
99+
``Doctrine\DBAL\Connection::TRANSACTION_*`` were moved into ``Doctrine\DBAL\TransactionIsolationLevel`` class without the ``TRANSACTION_`` prefix.
96100

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

lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement
123123

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

0 commit comments

Comments
 (0)