diff --git a/composer.json b/composer.json index 99b8f510c773..c762845f9a7e 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "phpunit/phpcov": "^9.0.2 || ^10.0", "phpunit/phpunit": "^10.5.16 || ^11.2", "predis/predis": "^1.1 || ^2.3", - "rector/rector": "2.0.5", + "rector/rector": "2.0.6", "shipmonk/phpstan-baseline-per-identifier": "^2.0" }, "replace": { diff --git a/tests/system/CommonFunctionsTest.php b/tests/system/CommonFunctionsTest.php index f2c81684b623..370ef44e55cb 100644 --- a/tests/system/CommonFunctionsTest.php +++ b/tests/system/CommonFunctionsTest.php @@ -400,7 +400,7 @@ public function testCSRFMeta(): void public function testModelNotExists(): void { - $this->assertNull(model(UnexsistenceClass::class)); + $this->assertNull(model(UnexsistenceClass::class)); // @phpstan-ignore class.notFound } public function testModelExistsBasename(): void diff --git a/tests/system/CommonHelperTest.php b/tests/system/CommonHelperTest.php index 96f609e84873..678c23ad24cd 100644 --- a/tests/system/CommonHelperTest.php +++ b/tests/system/CommonHelperTest.php @@ -142,13 +142,13 @@ public function testHelperLoadsAppHelperFirst(): void // this chunk is not needed really; just added so that IDEs will be happy if (! function_exists('foo_bar_baz')) { - function foo_bar_baz(): string + function foo_bar_baz(): string // @phpstan-ignore function.inner { return __FILE__; } } - $this->assertSame($this->dummyHelpers[0], foo_bar_baz()); // @phpstan-ignore-line function.notFound + $this->assertSame($this->dummyHelpers[0], foo_bar_baz()); // @phpstan-ignore function.notFound } public function testNamespacedHelperNotFound(): void diff --git a/tests/system/Test/ControllerTestTraitTest.php b/tests/system/Test/ControllerTestTraitTest.php index d5eac22981a7..aa130ba85cab 100644 --- a/tests/system/Test/ControllerTestTraitTest.php +++ b/tests/system/Test/ControllerTestTraitTest.php @@ -53,7 +53,7 @@ public function testBadController(): void $logger = new Logger(new LoggerConfig()); $this->withUri('http://example.com') ->withLogger($logger) - ->controller(NeverHeardOfIt::class) + ->controller(NeverHeardOfIt::class) // @phpstan-ignore class.notFound ->execute('index'); } diff --git a/utils/phpstan-baseline/class.notFound.neon b/utils/phpstan-baseline/class.notFound.neon deleted file mode 100644 index 52bbdf2d632b..000000000000 --- a/utils/phpstan-baseline/class.notFound.neon +++ /dev/null @@ -1,13 +0,0 @@ -# total 2 errors - -parameters: - ignoreErrors: - - - message: '#^Class CodeIgniter\\UnexsistenceClass not found\.$#' - count: 1 - path: ../../tests/system/CommonFunctionsTest.php - - - - message: '#^Class App\\Controllers\\NeverHeardOfIt not found\.$#' - count: 1 - path: ../../tests/system/Test/ControllerTestTraitTest.php diff --git a/utils/phpstan-baseline/function.inner.neon b/utils/phpstan-baseline/function.inner.neon deleted file mode 100644 index c51d5a2f1a87..000000000000 --- a/utils/phpstan-baseline/function.inner.neon +++ /dev/null @@ -1,8 +0,0 @@ -# total 1 error - -parameters: - ignoreErrors: - - - message: '#^Inner named functions are not supported by PHPStan\. Consider refactoring to an anonymous function, class method, or a top\-level\-defined function\. See issue \#165 \(https\://github\.com/phpstan/phpstan/issues/165\) for more details\.$#' - count: 1 - path: ../../tests/system/CommonHelperTest.php diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 7a758b2b8e94..feab1b53df83 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -2,7 +2,6 @@ includes: - argument.type.neon - assign.propertyType.neon - booleanAnd.rightAlwaysTrue.neon - - class.notFound.neon - codeigniter.cacheHandlerInstance.neon - codeigniter.configArgumentInstanceof.neon - codeigniter.frameworkExceptionInstance.neon @@ -17,7 +16,6 @@ includes: - empty.property.neon - expr.resultUnused.neon - function.alreadyNarrowedType.neon - - function.inner.neon - generator.valueType.neon - isset.offset.neon - isset.property.neon