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

mysqli_fetch_object: added missing generic #7240

Merged
merged 3 commits into from Dec 29, 2021
Merged

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Dec 29, 2021

No description provided.

@orklah
Copy link
Collaborator

orklah commented Dec 29, 2021

I'd expect this template to follow the change you did in the procedural function

* @template TValue

@staabm
Copy link
Contributor Author

staabm commented Dec 29, 2021

Sorry, I don't get what you are telling me.

@orklah
Copy link
Collaborator

orklah commented Dec 29, 2021

There's two way to get objects from a mysqli_result: https://www.php.net/manual/en/mysqli-result.fetch-object.php

There's an OOP style and Procedural style.

Both are in the stub file you changed, however, you added of object only to the procedural function mysqli_fetch_object and not in the OOP method mysqli_result::fetch_object

I'd expect both to behave similarly

@staabm
Copy link
Contributor Author

staabm commented Dec 29, 2021

IMO both apis - with the PR as is - define the same templates. you need to watch for the TValue vs. T.

I think both signatures match atm

@orklah
Copy link
Collaborator

orklah commented Dec 29, 2021

oh, nvm, I was talking about that: https://github.com/vimeo/psalm/pull/7240/files#r776390573 but it isn't in the final result

@orklah orklah added the release:fix The PR will be included in 'Fixes' section of the release notes label Dec 29, 2021
@orklah orklah merged commit 1d968fa into vimeo:master Dec 29, 2021
@orklah
Copy link
Collaborator

orklah commented Dec 29, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix The PR will be included in 'Fixes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants