From c91f9bb13a758dba840c81eedc913f58563ed82a Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Mon, 22 Feb 2021 13:13:52 +0100 Subject: [PATCH] Replace excludes_analyse by excludePaths when cannot ignore error --- src/Analyser/IgnoredErrorHelperResult.php | 2 +- tests/PHPStan/Analyser/AnalyserTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Analyser/IgnoredErrorHelperResult.php b/src/Analyser/IgnoredErrorHelperResult.php index e3a5a49f14..4aa7b42bf1 100644 --- a/src/Analyser/IgnoredErrorHelperResult.php +++ b/src/Analyser/IgnoredErrorHelperResult.php @@ -139,7 +139,7 @@ public function process( if ($shouldBeIgnored) { if (!$error->canBeIgnored()) { $addErrors[] = sprintf( - 'Error message "%s" cannot be ignored, use excludes_analyse instead.', + 'Error message "%s" cannot be ignored, use excludePaths instead.', $error->getMessage() ); return true; diff --git a/tests/PHPStan/Analyser/AnalyserTest.php b/tests/PHPStan/Analyser/AnalyserTest.php index 8c26b2a8b4..74ab02df1b 100644 --- a/tests/PHPStan/Analyser/AnalyserTest.php +++ b/tests/PHPStan/Analyser/AnalyserTest.php @@ -65,7 +65,7 @@ public function testIgnoringBrokenConfigurationDoesNotWork(): void $this->assertCount(2, $result); assert($result[0] instanceof Error); $this->assertSame('Class PHPStan\Tests\Baz was not found while trying to analyse it - autoloading is probably not configured properly.', $result[0]->getMessage()); - $this->assertSame('Error message "Class PHPStan\Tests\Baz was not found while trying to analyse it - autoloading is probably not configured properly." cannot be ignored, use excludes_analyse instead.', $result[1]); + $this->assertSame('Error message "Class PHPStan\Tests\Baz was not found while trying to analyse it - autoloading is probably not configured properly." cannot be ignored, use excludePaths instead.', $result[1]); } public function testIgnoreErrorByPath(): void