Skip to content

Commit 426d948

Browse files
committed
[BCB] Remove TypeUtils::generalizeType()
1 parent 5b44784 commit 426d948

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

UPGRADING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,4 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
255255
* Remove `TypeUtils::getConstantArrays()`, use [`Type::getConstantArrays()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getConstantArrays) instead
256256
* Remove `TypeUtils::getConstantStrings()`, use [`Type::getConstantStrings()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_getConstantStrings) instead
257257
* Remove `TypeUtils::getConstantTypes()` and `getAnyConstantTypes()`, use [`Type::isConstantValue()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_isConstantValue) or [`Type::generalize()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_generalize)
258+
* Remove `TypeUtils::generalizeType()`, use [`Type::generalize()`](https://apiref.phpstan.org/2.0.x/PHPStan.Type.Type.html#_generalize) instead

src/Type/TypeUtils.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ public static function getConstantIntegers(Type $type): array
2828
return self::map(ConstantIntegerType::class, $type, false);
2929
}
3030

31-
/**
32-
* @deprecated Use PHPStan\Type\Type::generalize() instead.
33-
*/
34-
public static function generalizeType(Type $type, GeneralizePrecision $precision): Type
35-
{
36-
return $type->generalize($precision);
37-
}
38-
3931
/**
4032
* @return list<string>
4133
*

0 commit comments

Comments
 (0)