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

dir has wrong return type Directory|false|null instead of Directory|false #7345

Closed
VincentLanglet opened this issue Jan 8, 2022 · 4 comments · Fixed by #7347
Closed

dir has wrong return type Directory|false|null instead of Directory|false #7345

VincentLanglet opened this issue Jan 8, 2022 · 4 comments · Fixed by #7347

Comments

@VincentLanglet
Copy link
Contributor

Hi @orklah,

I run into the following issue

  • Psalm consider dir to return Directory|false|null
  • PHPStan consider dir to return Directory|false

The previous type was introduced by @voku in #1541

I did some research, and it seems that the php doc was updated recently from Directory|false|null to Directory|false.
php/doc-en#903

But I'm not sure which CallMap should be modified then...

@psalm-github-bot
Copy link

Hey @VincentLanglet, can you reproduce the issue on https://psalm.dev ?

@weirdan
Copy link
Collaborator

weirdan commented Jan 8, 2022

It's changed in PHP 7.2: php/php-src@b71b128#diff-a6738c9e7e606e49fc4e7225c281deca86191ada31a5dc077169418541541d1cL218

@weirdan
Copy link
Collaborator

weirdan commented Jan 8, 2022

Actually, in 8.0: https://3v4l.org/RfVEi, when ZPP started to throw. But since this was zpp-null, you need to drop null from all callmaps.

@VincentLanglet
Copy link
Contributor Author

But since this was zpp-null, you need to drop null from all callmaps.

Did #7347 then

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 a pull request may close this issue.

2 participants