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

Remove incorrect overrides in PHP8 for proc_get_status #429

Merged
merged 3 commits into from Jan 20, 2021

Conversation

Firehed
Copy link
Contributor

@Firehed Firehed commented Jan 20, 2021

Related to #288: the more-precise return shape is overridden with a less-specific version when running under PHP8. This removes the override which seems to have come from an external import.

I'm not sure what's up with the original removal of |false, which doesn't seem to match up with the official docs

@VincentLanglet
Copy link
Contributor

The official doc is flag as (PHP 5, PHP 7)

A lot of false value were removed in php 8 https://www.php.net/releases/8.0/en.php#consistent-type-errors-for-internal-functions

@Firehed
Copy link
Contributor Author

Firehed commented Jan 20, 2021

Huh, I wasn't under the impression that was a type error which would cause the return false. In that case I'll update this to match override to the more-specific signature. Thanks.

@ondrejmirtes
Copy link
Member

Hi, the line could just be removed with the same effect. PHPStan uses official php-src stubs on PHP 8 so it will be inferred from that (and merged with functionMap.php): https://github.com/phpstan/php-8-stubs/blob/main/stubs/ext/standard/proc_get_status.php

@Firehed
Copy link
Contributor Author

Firehed commented Jan 20, 2021

Should I roll back to the previous version then? That is what I originally did.

@ondrejmirtes
Copy link
Member

Yes, the first commit was sufficient 👍

@ondrejmirtes ondrejmirtes merged commit f69bd3e into phpstan:master Jan 20, 2021
@Firehed Firehed deleted the fix-proc-get-status branch January 20, 2021 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants