Hey Máté,

On Thu, Apr 22, 2021, 09:42 Máté Kocsis <kocsismat...@gmail.com> wrote:

> Hi Internals,
>
> I've just opened the vote about
> https://wiki.php.net/rfc/internal_method_return_types
> and I will close it on 2021-05-06.
>
> For prior discussion, please see https://externals.io/message/113413


Overall OK with the RFC, but we do such a.fuss about not breaking compat on
inheritance for then breaking it in reflection, where we add two methods
that completely shake down the tree.

Therefore I voted NO, especially considering the implications this has on
libraries like BetterReflection: the return type is there and it is clear,
it just hasn't been explicitly declared by the engine, but there isn't a
need for dropping it from reflection.

In fact, if reflection were to switch to the actual runtime return types of
those methods, I don't see a reason why downstream consumers would break
(stubbing tools, code generators, type checkers, dependency solvers, etc.)

I would vote yes on the RFC if this section were omitted, and reflection
started to report the new types in 8.1 (or another 8.x).

Reply via email to