-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Fix @return annotations for lastInsertId methods in yii\db\mssql namespace
#20628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mspirkov
commented
Oct 19, 2025
| Q | A |
|---|---|
| Is bugfix? | ✔️ |
| New feature? | ❌ |
| Breaks BC? | ❌ |
| Fixed issues |
| * Returns value of the last inserted ID. | ||
| * @param string|null $name the sequence name. Defaults to null. | ||
| * @return int last inserted ID value. | ||
| * @return string|false last inserted ID value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that there is a conversion to bigint. It seems that regardless of the settings, the result will be string|false.
| * Returns value of the last inserted ID. | ||
| * @param string|null $sequence the sequence name. Defaults to null. | ||
| * @return int last inserted ID value. | ||
| * @return string|false last inserted ID value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that there is a conversion to bigint. It seems that regardless of the settings, the result will be string|false.
| * last inserted ID (like the other PDO drivers). | ||
| * @param string|null $sequence the sequence name. Defaults to null. | ||
| * @return int last inserted ID value. | ||
| * @return string|false last inserted ID value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.


