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

Handle more PHPStan type edge-cases #487

Merged
merged 5 commits into from
Dec 2, 2024

Conversation

shish
Copy link
Collaborator

@shish shish commented Dec 2, 2024

Less crashing in code generation \o/

shish added a commit to shish/safe that referenced this pull request Dec 2, 2024
After thecodingmachine#486 thecodingmachine#487 and thecodingmachine#488 are merged, running `./.devcontainer/build.sh` produces this output, which contains a couple of years worth of updates - and from there, the github cronjob _should_ submit incremental updates as PRs automatically
@staabm
Copy link
Collaborator

staabm commented Dec 2, 2024

per #488 (comment) the tests of this PR should now succeed - as the other 2 dependent PRs have been merged - right ?

@shish
Copy link
Collaborator Author

shish commented Dec 2, 2024

@staabm getting close, though it seems I prematurely assumed that all the PHP versions had the same test failures, when actually 8.1 and 8.2-8.4 had different failures >.< But at least the divergence is small enough now, so I'll try to keep the fixes in this PR...

@shish
Copy link
Collaborator Author

shish commented Dec 2, 2024

@staabm generator and generated tests passing on all versions \o/

(The sync test is failing because I'm keeping this PR to just the code change, and then the github bot should automatically submit a PR with the generated-file changes, or we can manually do a sync with #489 )

@staabm staabm merged commit a6a57ba into thecodingmachine:master Dec 2, 2024
11 of 12 checks passed
@staabm
Copy link
Collaborator

staabm commented Dec 2, 2024

Awesome

@@ -112,7 +112,11 @@ public function testVoid(): void
{
$param = new PhpStanType('');
$this->assertEquals('', $param->getDocBlockType());
$this->assertEquals('', $param->getSignatureType());
if (PHP_VERSION_ID >= 80200) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we need to fix?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I'm not sure exactly why php8.1 is generating different output here D: It should probably be investigated at least

@shish shish deleted the phpstan-types branch December 2, 2024 19:24
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