Closed scyzoryck closed 1 year ago
This was already implemented in the past and reverted. It does not work well when the de-serialized type is an array or objects.
I use this extension to provide the return type in this case https://github.com/goetas/jms-serializer-phpstan-extension
It looks like right now to have a proper type hints for it required additional plugin. Inspired by: https://phpstan.org/blog/generics-by-examples it allowed to use generics for type hinting.
Debug file
Before
After