rectorphp / rector-symfony

Rector upgrade rules for Symfony
http://getrector.com
MIT License
179 stars 86 forks source link

[CodeQuality] Skip posible return array + response on ResponseReturnTypeControllerActionRector #660

Closed samsonasik closed 1 month ago

samsonasik commented 1 month ago

ref https://github.com/rectorphp/rector-src/pull/6200#pullrequestreview-2207245293

it currently got incorrect return:

-    public function editAction(Request $request, $id = null)
+    public function editAction(Request $request, $id = null): ?array

Applied rules:
 * ResponseReturnTypeControllerActionRector

This PR fix it.

samsonasik commented 1 month ago

Fixed 🎉

samsonasik commented 1 month ago

All checks have passed 🎉 @TomasVotruba I think it is ready.

samsonasik commented 1 month ago

@TomasVotruba I am merging it to have faster feedback to test ;)

samsonasik commented 1 month ago

I found another many use cases that it got invalid ?array if the Response return is from custom method non-native return, I will add only return when natively

TomasVotruba commented 1 month ago

Looks good :+1: