-
Notifications
You must be signed in to change notification settings - Fork 384
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
Raise PHPStan level to 4 in lib/common #4686
Changes from all commits
a5bb14d
82f7b02
8481781
0cda75a
ba20769
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ public function currentVersion($options = []) | |
$response = $this->remoteRequest->get(self::RUNTIME_METADATA_ENDPOINT); | ||
$statusCode = $response->getStatusCode(); | ||
|
||
if (200 < $statusCode || $statusCode >= 300) { | ||
if ($statusCode < 200 || $statusCode >= 300) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This bug means that the fallback stylesheet would almost always be used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we should backport this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool. Then I'll squash merge and cherry-pick. |
||
return '0'; | ||
} | ||
|
||
|
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.
I assume your PR on the phpstan repo (phpstan/phpstan-src#203) fixes this. Once a new release is made with that change we should be able to remove this.
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.
Yes. The general idea is to update to latest PHPStan and revisit the exceptions here each time we bump the level.
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.
FWIW I think PHPStan will complain if an exception is no longer encountered. In other words, it will tell you that you can remove it :-)
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.
Yes, indeed, it does.