From aed93193ae90d353661e10b0eabcf0528422231f Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Thu, 2 Mar 2023 10:05:37 +0100 Subject: [PATCH] RuleError interfaces are part of BC promise --- src/Rules/Api/BcUncoveredInterface.php | 14 ++++++++++++++ src/Rules/FileRuleError.php | 1 + src/Rules/IdentifierRuleError.php | 1 + src/Rules/LineRuleError.php | 1 + src/Rules/MetadataRuleError.php | 1 + src/Rules/NonIgnorableRuleError.php | 1 + src/Rules/RuleError.php | 1 + src/Rules/TipRuleError.php | 1 + 8 files changed, 21 insertions(+) diff --git a/src/Rules/Api/BcUncoveredInterface.php b/src/Rules/Api/BcUncoveredInterface.php index e3875170c..795f5f8f7 100644 --- a/src/Rules/Api/BcUncoveredInterface.php +++ b/src/Rules/Api/BcUncoveredInterface.php @@ -8,6 +8,13 @@ use PHPStan\Reflection\ParameterReflectionWithPhpDocs; use PHPStan\Reflection\ParametersAcceptorWithPhpDocs; use PHPStan\Reflection\ReflectionProvider; +use PHPStan\Rules\FileRuleError; +use PHPStan\Rules\IdentifierRuleError; +use PHPStan\Rules\LineRuleError; +use PHPStan\Rules\MetadataRuleError; +use PHPStan\Rules\NonIgnorableRuleError; +use PHPStan\Rules\RuleError; +use PHPStan\Rules\TipRuleError; use PHPStan\Type\Type; final class BcUncoveredInterface @@ -21,6 +28,13 @@ final class BcUncoveredInterface ExtendedMethodReflection::class, ParametersAcceptorWithPhpDocs::class, ParameterReflectionWithPhpDocs::class, + FileRuleError::class, + IdentifierRuleError::class, + LineRuleError::class, + MetadataRuleError::class, + NonIgnorableRuleError::class, + RuleError::class, + TipRuleError::class, ]; } diff --git a/src/Rules/FileRuleError.php b/src/Rules/FileRuleError.php index 7f5cd7fc2..6fe3ef856 100644 --- a/src/Rules/FileRuleError.php +++ b/src/Rules/FileRuleError.php @@ -2,6 +2,7 @@ namespace PHPStan\Rules; +/** @api */ interface FileRuleError extends RuleError { diff --git a/src/Rules/IdentifierRuleError.php b/src/Rules/IdentifierRuleError.php index fb556fc87..b7e32e019 100644 --- a/src/Rules/IdentifierRuleError.php +++ b/src/Rules/IdentifierRuleError.php @@ -2,6 +2,7 @@ namespace PHPStan\Rules; +/** @api */ interface IdentifierRuleError extends RuleError { diff --git a/src/Rules/LineRuleError.php b/src/Rules/LineRuleError.php index 0388b7fca..986840eff 100644 --- a/src/Rules/LineRuleError.php +++ b/src/Rules/LineRuleError.php @@ -2,6 +2,7 @@ namespace PHPStan\Rules; +/** @api */ interface LineRuleError extends RuleError { diff --git a/src/Rules/MetadataRuleError.php b/src/Rules/MetadataRuleError.php index 01b6d1551..5123d37c8 100644 --- a/src/Rules/MetadataRuleError.php +++ b/src/Rules/MetadataRuleError.php @@ -2,6 +2,7 @@ namespace PHPStan\Rules; +/** @api */ interface MetadataRuleError extends RuleError { diff --git a/src/Rules/NonIgnorableRuleError.php b/src/Rules/NonIgnorableRuleError.php index 4b79dac56..f0a4fbeee 100644 --- a/src/Rules/NonIgnorableRuleError.php +++ b/src/Rules/NonIgnorableRuleError.php @@ -2,6 +2,7 @@ namespace PHPStan\Rules; +/** @api */ interface NonIgnorableRuleError extends RuleError { diff --git a/src/Rules/RuleError.php b/src/Rules/RuleError.php index 6fadd1cd7..ee2e0f5f6 100644 --- a/src/Rules/RuleError.php +++ b/src/Rules/RuleError.php @@ -2,6 +2,7 @@ namespace PHPStan\Rules; +/** @api */ interface RuleError { diff --git a/src/Rules/TipRuleError.php b/src/Rules/TipRuleError.php index fa9f8f988..ac518ddce 100644 --- a/src/Rules/TipRuleError.php +++ b/src/Rules/TipRuleError.php @@ -2,6 +2,7 @@ namespace PHPStan\Rules; +/** @api */ interface TipRuleError extends RuleError {