Skip to content

Commit 7088d79

Browse files
committed
[BCB] Remove TypeUtils::getEnumCaseObjects()
1 parent b9ad2ec commit 7088d79

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

UPGRADING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,4 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
258258
* Remove `TypeUtils::generalizeType()`, use [`Type::generalize()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_generalize) instead
259259
* Remove `TypeUtils::getDirectClassNames()`, use [`Type::getObjectClassNames()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getObjectClassNames) instead
260260
* Remove `TypeUtils::getConstantScalars()`, use [`Type::isConstantScalarValue()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_isConstantScalarValue) or [`Type::getConstantScalarTypes()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getConstantScalarTypes) instead
261+
* Remove `TypeUtils::getEnumCaseObjects()`, use [`Type::getEnumCases()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getEnumCases) instead

src/Type/TypeUtils.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use PHPStan\Type\Accessory\HasPropertyType;
77
use PHPStan\Type\Constant\ConstantArrayType;
88
use PHPStan\Type\Constant\ConstantIntegerType;
9-
use PHPStan\Type\Enum\EnumCaseObjectType;
109
use PHPStan\Type\Generic\TemplateBenevolentUnionType;
1110
use PHPStan\Type\Generic\TemplateType;
1211
use PHPStan\Type\Generic\TemplateUnionType;
@@ -34,15 +33,6 @@ public static function getIntegerRanges(Type $type): array
3433
return self::map(IntegerRangeType::class, $type, false);
3534
}
3635

37-
/**
38-
* @deprecated Use Type::getEnumCases()
39-
* @return EnumCaseObjectType[]
40-
*/
41-
public static function getEnumCaseObjects(Type $type): array
42-
{
43-
return self::map(EnumCaseObjectType::class, $type, false);
44-
}
45-
4636
/**
4737
* @return mixed[]
4838
*/

0 commit comments

Comments
 (0)