[Downgrade] Reinstate `mixed` type and union types in anonymous functions
leoloso opened this issue · comments
Leonardo Losoviz commented
The mixed
type is being downgraded for PHP 7.1, however currently the rule does not work with anonymous functions.
Then, this code is not being downgraded:
if ($failedCastingFieldArgs = \array_filter($castedFieldArgs, function (mixed $fieldArgValue) {
return \is_null($fieldArgValue);
})) {
It has been temporarily commented out. Re-enable once Rector can downgrade this code.
Also implement for union types (rectorphp/rector#5989 was closed in Rector repo):
$ids = array_map(
- function (int | string $id) {
+ function ($id) {
return 'v' . $id;
},
$ids
);
Leonardo Losoviz commented
To reinstate commented code, search for:
// @see https://github.com/leoloso/PoP/issues/626