-
Notifications
You must be signed in to change notification settings - Fork 660
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: check for php v8.1.0 in ReturnTypeAnalyzer (rather than v8.10.0) #9472
base: master
Are you sure you want to change the base?
fix: check for php v8.1.0 in ReturnTypeAnalyzer (rather than v8.10.0) #9472
Conversation
seems like it makes this code fails: $generator = static function (): \Generator
{
yield from [];
}; we should probably add a test with this cc @kkmuffme , do you have an idea why this fails? |
Can we declare |
Should it be 7_04_00? I don't see 5_06_00 mentions in the codebase. And composer.json says minimum version is 7.4. (By the way, I'm seeing that in ProjectAnalyzer.php's Ideally, I guess versions should be written in a single place, so they do not need to be updated on every PHP release, on dozens of places. Or maybe a test could be written to enforce these versions. Going to the point, if I try to declare this in Codebase.php:
I get:
If I put:
I get:
If I try to suppress InvalidPropertyAssignmentValue here, I get around 80 errors, such as:
I'm not familiar with the psalm codebase (nor in using psalm a lot, yet, to be honest), and I'm a bit unsure how to best address this (without specifying a declaration that include PHP versions, in many places) And the same regarding the impact of this change, as unfortunately I don't fully follow the code. |
00a71c7
to
ee21f44
Compare
BCC failure is ok I think. |
/** @var int */ | ||
public $analysis_php_version_id = PHP_VERSION_ID; | ||
/** @var int<50400,80299> */ | ||
public $analysis_php_version_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off-topic, but should it be a space after the comma? Not sure phpcs has rules that support enforcing this kind of things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either way is fine by me.
No description provided.