From d7798d7f2c47f426efe91c566e6cafd5a4e2410c Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Mon, 30 Sep 2024 21:42:26 +0200 Subject: [PATCH] Rules about tooWideThrowType moved to level 4 --- conf/config.level4.neon | 12 ++++++++++++ conf/config.neon | 10 ---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/conf/config.level4.neon b/conf/config.level4.neon index 5636417046..e77344de28 100644 --- a/conf/config.level4.neon +++ b/conf/config.level4.neon @@ -25,6 +25,12 @@ rules: - PHPStan\Rules\TooWideTypehints\TooWidePropertyTypeRule - PHPStan\Rules\Traits\NotAnalysedTraitRule +conditionalTags: + PHPStan\Rules\Exceptions\TooWideFunctionThrowTypeRule: + phpstan.rules.rule: %exceptions.check.tooWideThrowType% + PHPStan\Rules\Exceptions\TooWideMethodThrowTypeRule: + phpstan.rules.rule: %exceptions.check.tooWideThrowType% + parameters: checkAdvancedIsset: true @@ -228,6 +234,12 @@ services: tags: - phpstan.rules.rule + - + class: PHPStan\Rules\Exceptions\TooWideFunctionThrowTypeRule + + - + class: PHPStan\Rules\Exceptions\TooWideMethodThrowTypeRule + - class: PHPStan\Rules\TooWideTypehints\TooWideMethodReturnTypehintRule arguments: diff --git a/conf/config.neon b/conf/config.neon index d627237282..e5082b1ce4 100644 --- a/conf/config.neon +++ b/conf/config.neon @@ -205,10 +205,6 @@ conditionalTags: phpstan.rules.rule: %exceptions.check.missingCheckedExceptionInThrows% PHPStan\Rules\Exceptions\MissingCheckedExceptionInMethodThrowsRule: phpstan.rules.rule: %exceptions.check.missingCheckedExceptionInThrows% - PHPStan\Rules\Exceptions\TooWideFunctionThrowTypeRule: - phpstan.rules.rule: %exceptions.check.tooWideThrowType% - PHPStan\Rules\Exceptions\TooWideMethodThrowTypeRule: - phpstan.rules.rule: %exceptions.check.tooWideThrowType% services: - @@ -881,12 +877,6 @@ services: arguments: exceptionTypeResolver: @exceptionTypeResolver - - - class: PHPStan\Rules\Exceptions\TooWideFunctionThrowTypeRule - - - - class: PHPStan\Rules\Exceptions\TooWideMethodThrowTypeRule - - class: PHPStan\Rules\Exceptions\TooWideThrowTypeCheck