Hi @TomasVotruba @samsonasik Because of recent merge on PHPStan the test https://github.com/rectorphp/rector-src/blob/5be8f82d019842fb56fd0338da0b0569dbdf0bcb/rules-tests/TypeDeclaration/Rector/ArrowFunction/AddArrowFunctionReturnTypeRector/Fixture/return_by_array_shape_type.php.inc will fail on next PHPStan release. To me, this seems to be expected since you're calling `getNativeType` https://github.com/rectorphp/rector-src/blob/5be8f82d019842fb56fd0338da0b0569dbdf0bcb/rules/TypeDeclaration/Rector/ArrowFunction/AddArrowFunctionReturnTypeRector.php#L61 And in ``` /** * @param array<int, array{bar: int}> $values */ private function foo(array $values): void { $bars = array_map(fn($value) => $value['bar'], $values); } ``` the native type of `$value['bar']` was fixed from `int` to `mixed`. (Cause `$values` is just an array) I dunno if you want to - change your implementation - remove/update the test
Hi @TomasVotruba @samsonasik
Because of recent merge on PHPStan the test https://github.com/rectorphp/rector-src/blob/5be8f82d019842fb56fd0338da0b0569dbdf0bcb/rules-tests/TypeDeclaration/Rector/ArrowFunction/AddArrowFunctionReturnTypeRector/Fixture/return_by_array_shape_type.php.inc will fail on next PHPStan release.
To me, this seems to be expected since you're calling
getNativeTypehttps://github.com/rectorphp/rector-src/blob/5be8f82d019842fb56fd0338da0b0569dbdf0bcb/rules/TypeDeclaration/Rector/ArrowFunction/AddArrowFunctionReturnTypeRector.php#L61
And in
the native type of
$value['bar']was fixed frominttomixed. (Cause$valuesis just an array)I dunno if you want to