Skip to content
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

Fix type assumptions about Connection::lastInsertId() #5909

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

phansys
Copy link
Contributor

@phansys phansys commented Feb 7, 2023

Q A
Type improvement
Fixed issues n/a

Summary

See:

To-Do:

  • Check the error Method Doctrine\DBAL\Driver\PDO\Connection::lastInsertId() should return int|numeric-string but returns non-falsy-string.

@phansys phansys marked this pull request as ready for review February 7, 2023 13:57
@derrabus
Copy link
Member

derrabus commented Feb 7, 2023

Doctrine\DBAL\Driver\Connection::lastInsertId() needs to be updated as well.

@derrabus derrabus added this to the 4.0.0-beta2 milestone Feb 7, 2023
@@ -57,8 +57,6 @@ public function exec(string $sql): int|string;
* previous statement. DO NOT RELY ON THIS BEHAVIOR which is driver-dependent: always use getLastInsertId() right
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a typo? or where is getLastInsertId() defined?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a typo to me.

@derrabus derrabus merged commit 1295b5f into doctrine:4.0.x Feb 7, 2023
@phansys phansys deleted the last_insert_id branch February 7, 2023 23:15
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants