Skip to content

Commit 9b918e3

Browse files
committed
[BCB] Remove UnionType::pickTypes(), use pickFromTypes() instead
1 parent 9bab8ca commit 9b918e3

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

UPGRADING.md

+1
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,4 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
235235
* Remove `ArrayType::generalizeKeys()`
236236
* Remove `ArrayType::count()`, use `Type::getArraySize()` instead
237237
* Remove `ArrayType::castToArrayKeyType()`, `Type::toArrayKey()` instead
238+
* Remove `UnionType::pickTypes()`, use `pickFromTypes()` instead

src/Type/UnionType.php

-12
Original file line numberDiff line numberDiff line change
@@ -1105,18 +1105,6 @@ protected function unionTypes(callable $getType): Type
11051105
return TypeCombinator::union(...array_map($getType, $this->types));
11061106
}
11071107

1108-
/**
1109-
* @template T of Type
1110-
* @param callable(Type $type): list<T> $getTypes
1111-
* @return list<T>
1112-
*
1113-
* @deprecated Use pickFromTypes() instead.
1114-
*/
1115-
protected function pickTypes(callable $getTypes): array
1116-
{
1117-
return $this->pickFromTypes($getTypes, static fn () => false);
1118-
}
1119-
11201108
/**
11211109
* @template T
11221110
* @param callable(Type $type): list<T> $getValues

0 commit comments

Comments
 (0)