-
Notifications
You must be signed in to change notification settings - Fork 60
chore: update to phpstan major version 2 #255
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
Changes from all commits
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 |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| $includes = []; | ||
| if (PHP_VERSION_ID >= 80000) { | ||
| $includes[] = __DIR__.'/phpstan-ignore-php8.neon'; | ||
| } else { | ||
| $includes[] = __DIR__.'/phpstan-ignore-php74.neon'; | ||
| } | ||
|
|
||
| $config = []; | ||
| $config['includes'] = $includes; | ||
|
|
||
| // overrides config.platform.php in composer.json | ||
| $config['parameters']['phpVersion'] = PHP_VERSION_ID; | ||
|
|
||
| return $config; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| parameters: | ||
| ignoreErrors: | ||
| - | ||
| message: "#^Left side of || is always false.$#" | ||
| count: 10 | ||
| path: lib/Client.php |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| parameters: | ||
| ignoreErrors: | ||
| - | ||
| message: "#^Left side of || is always false.$#" | ||
| count: 23 | ||
| path: lib/Client.php |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -200,7 +200,7 @@ public function test401(): void | |
| { | ||
| $this->auth->requireLogin(); | ||
| $test = preg_match('/^AWS$/', $this->response->getHeader('WWW-Authenticate'), $matches); | ||
| self::assertTrue(true == $test, 'The WWW-Authenticate response didn\'t match our pattern'); | ||
| self::assertTrue(1 === $test, 'The WWW-Authenticate response didn\'t match our pattern'); | ||
|
Comment on lines
202
to
+203
Contributor
Author
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.
|
||
| } | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,7 +166,7 @@ private function getServerTokens(int $qop = Digest::QOP_AUTH): array | |
| $test = preg_match('/Digest realm="'.self::REALM.'",qop="'.$qopstr.'",nonce="([0-9a-f]*)",opaque="([0-9a-f]*)"/', | ||
| $this->response->getHeader('WWW-Authenticate'), $matches); | ||
|
|
||
| self::assertTrue(true == $test, 'The WWW-Authenticate response didn\'t match our pattern. We received: '.$this->response->getHeader('WWW-Authenticate')); | ||
| self::assertTrue(1 === $test, 'The WWW-Authenticate response didn\'t match our pattern. We received: '.$this->response->getHeader('WWW-Authenticate')); | ||
|
Contributor
Author
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.
|
||
|
|
||
| $nonce = $matches[1]; | ||
| $opaque = $matches[2]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,7 @@ public function testGetQueryParametersNoData(): void | |
| } | ||
|
|
||
| /** | ||
| * @backupGlobals | ||
| * @backupGlobals enabled | ||
|
Contributor
Author
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. backupGlobals should explicitly have the keyword "enabled"
Member
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. Did this annotation work as expected in phpunit without the suffix? |
||
| */ | ||
| public function testCreateFromPHPRequest(): void | ||
| { | ||
|
|
||
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.
getHeadercan only return string or null. Sois_int()is useless code.