Proxy objects and return types conflict

by lord_of_strings   Last Updated January 20, 2018 15:09 PM

Magento is designed to use PHP 7, newest versions even 7.1. Actually one of the most killing feature - return types doesn't work well with Magento implementation of Proxy object.

For example I create proxy for some dependency of class. This dependency has a few methods and at least one of them contains return type. It will fail later as the proxy won't copy return type at all, and declarations of methods in original and proxy class won't match. Has some figured out something to make it work? Or is it question for core team as request for bug fix?

Related Questions

Magento 2 proxy class override

Updated May 16, 2016 08:04 AM