Skip to content

Commit

Permalink
Upgrade PHPStan version (#1614)
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Dec 14, 2021
1 parent 666baa5 commit 497bd4a
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 51 deletions.
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@
"helmich/phpunit-json-assert": "^3.0",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/extension-installer": "^1.1.0",
"phpstan/phpstan": "^0.12.99",
"phpstan/phpstan-phpunit": "^0.12.22",
"phpstan/phpstan-strict-rules": "^0.12.11",
"phpstan/phpstan-webmozart-assert": "^0.12.16",
"phpstan/phpstan": "^1.2.0",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.1.0",
"phpstan/phpstan-webmozart-assert": "^1.0.2",
"phpunit/phpunit": "^9.3.11",
"symfony/phpunit-bridge": "^4.4.18 || ^5.1.10",
"symfony/yaml": "^5.0",
"thecodingmachine/phpstan-safe-rule": "^1.0.1"
"thecodingmachine/phpstan-safe-rule": "^1.1.0"
},
"config": {
"platform": {
Expand Down
91 changes: 47 additions & 44 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions devTools/phpstan-src.neon
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ parameters:
- '#^Variable (method|property) (access|call) #'
-
path: '../src/Metrics/MetricsCalculator.php'
message: '#^Strict comparison using !== between array<int, Infection\\Mutant\\MutantExecutionResult> and array\(\) will always evaluate to true\.$#'
message: '#^Strict comparison using !== between array<int, Infection\\Mutant\\MutantExecutionResult> and array{} will always evaluate to true\.$#'
count: 1
-
path: ../src/TestFramework/Factory.php
message: '#^Parameter \#1 \$callback of function array_map expects callable\(Infection\\TestFramework\\Coverage\\Trace\|SplFileInfo\): mixed, Closure\(SplFileInfo\): string\|false given\.$#'
message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(Infection\\TestFramework\\Coverage\\Trace\|SplFileInfo\): mixed\)\|null, Closure\(SplFileInfo\): string\|false given\.$#'
count: 1
-
path: ../src/TestFramework/Factory.php
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/Console/E2ETest.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ private function installComposerDeps(): void

// $vendorDir is normally defined inside autoload_psr4.php, but PHPStan
// can't see there, so have to both tell it so, and verify that too
// @phpstan-ignore-next-line
$vendorDir = $vendorDir ?? null;
$this->assertNotEmpty($vendorDir, 'Unexpected autoload_psr4.php found: please confirm that all dependencies are installed correctly for this fixture.');

Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/Logger/FileLoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ final class FileLoggerTest extends FileSystemTestCase

protected function setUp(): void
{
parent::setUp();

$this->fileSystemMock = $this->createMock(Filesystem::class);
$this->logger = new DummyLogger();
}
Expand Down

0 comments on commit 497bd4a

Please sign in to comment.