diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 02b99ed61bb..35780732270 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1078,7 +1078,7 @@ parameters: path: src/Type/Constant/OversizedArrayBuilder.php - - rawMessage: 'Doing instanceof PHPStan\Type\Enum\EnumCaseObjectType is error-prone and deprecated. Use Type::getEnumCases() instead.' + rawMessage: 'Doing instanceof PHPStan\Type\Enum\EnumCaseObjectType is error-prone and deprecated. Use Type::getEnumCaseObject() or Type::getEnumCases() instead.' identifier: phpstanApi.instanceofType count: 2 path: src/Type/Enum/EnumCaseObjectType.php @@ -1432,7 +1432,7 @@ parameters: path: src/Type/IntersectionType.php - - rawMessage: 'Doing instanceof PHPStan\Type\Enum\EnumCaseObjectType is error-prone and deprecated. Use Type::getEnumCases() instead.' + rawMessage: 'Doing instanceof PHPStan\Type\Enum\EnumCaseObjectType is error-prone and deprecated. Use Type::getEnumCaseObject() or Type::getEnumCases() instead.' identifier: phpstanApi.instanceofType count: 1 path: src/Type/IntersectionType.php @@ -1762,7 +1762,7 @@ parameters: path: src/Type/UnionTypeHelper.php - - rawMessage: 'Doing instanceof PHPStan\Type\Enum\EnumCaseObjectType is error-prone and deprecated. Use Type::getEnumCases() instead.' + rawMessage: 'Doing instanceof PHPStan\Type\Enum\EnumCaseObjectType is error-prone and deprecated. Use Type::getEnumCaseObject() or Type::getEnumCases() instead.' identifier: phpstanApi.instanceofType count: 2 path: src/Type/UnionTypeHelper.php diff --git a/src/Type/Enum/EnumCaseObjectType.php b/src/Type/Enum/EnumCaseObjectType.php index ca0e976e787..ef5596500ca 100644 --- a/src/Type/Enum/EnumCaseObjectType.php +++ b/src/Type/Enum/EnumCaseObjectType.php @@ -32,7 +32,7 @@ use function sprintf; /** @api */ -#[InstanceofDeprecated(insteadUse: 'Type::getEnumCases()')] +#[InstanceofDeprecated(insteadUse: 'Type::getEnumCaseObject() or Type::getEnumCases()')] class EnumCaseObjectType extends ObjectType {