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
Upgrade PHPStan to 1.0 #10253
Upgrade PHPStan to 1.0 #10253
Conversation
The ClassLoader thing is definitely a weird bug, I'm gonna look into it. |
It should work with PHPStan 1.0.2, please upgrade and test it :) https://github.com/phpstan/phpstan/releases/tag/1.0.2 |
Yup that worked, thanks! |
@@ -286,10 +286,10 @@ private function initDownload($resolve, $reject, $origin, $url, $options, $copyT | |||
*/ | |||
public function abortRequest($id) | |||
{ | |||
if (isset($this->jobs[$id], $this->jobs[$id]['handle'])) { | |||
if (isset($this->jobs[$id], $this->jobs[$id]['curlHandle'])) { |
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.
That was actually a bug causing aborts to fail 👍🏻
@ondrejmirtes sorry to bother again but would you please look at the last failing one? I can't make any sense of it, and can't repro it in a minimalistic test case sadly https://phpstan.org/r/ef8e8b43-5e90-41c8-8453-6ab3c7b011d9 See https://github.com/composer/composer/runs/4199944625?check_suite_focus=true |
@Seldaek I remember that one. Could it be that isset is not needed because it is used in the canceller, which is always called after startJob, where curl_id is always set? Which would narrow the type and then it's not optional any more. Must be something like that. |
I don't think it's that smart (great if it is tho;)) but could be something about the closures using $job by reference which somehow alerts the type? Not sure. |
OK found a way to repro it, reported phpstan/phpstan#6008 and will add to baseline for now. |
Still WIP for now, need to fix a few errors which are newly reported in 1.0 (if anyone wants to help feel free to send a PR against my PR branch, I won't have time to wrap this up in the next few days/weeks I think).
I am not sure what's up with all the ClassLoader failures though. I am thinking it may be a loading issue whereas the ClassLoader that is shipped with PHPStan is used and not the one from the Composer repo. Seemed to work fine in 0.12 though. @ondrejmirtes any clue about this? If not I can also just ignore these in baseline, it's not a huge deal as this class is pretty much written in stone.