Skip to content

Fix a few MongoDB definitions in functionMap.php#2140

Merged
ondrejmirtes merged 1 commit intophpstan:1.9.xfrom
UCIS:patch-1
Jan 4, 2023
Merged

Fix a few MongoDB definitions in functionMap.php#2140
ondrejmirtes merged 1 commit intophpstan:1.9.xfrom
UCIS:patch-1

Conversation

@UCIS
Copy link
Copy Markdown
Contributor

@UCIS UCIS commented Dec 22, 2022

I think a few function definitions related to the MongoDB extension are incorrect or outdated. This results in incorrect errors as shown here: https://phpstan.org/r/0bdf022f-164a-4daa-bd51-6f127a5c3e44

I have updated two of the obvious errors, but there might be more outdated definitions. Are these definitions required at all? It appears I can get the same information using runtime reflection.

@ondrejmirtes ondrejmirtes merged commit d279f38 into phpstan:1.9.x Jan 4, 2023
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

@ondrejmirtes
Copy link
Copy Markdown
Member

Are these definitions required at all?

Yes. Reflection is often wrong or incomplete. PHPStan uses multiple sources of data, see https://phpstan.org/user-guide/troubleshooting-types#internal-stubs for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants