Re: [RFC] [Discussion] Adding return types to internal methods
> Le 6 mars 2021 à 23:56, Máté Kocsis <kocsismate90@gmail.com> a écrit :
>
> Hi Internals,
>
> I've just finished the first iteration of the RFC (
> https://wiki.php.net/rfc/internal_method_return_types)
> as well as the
> implementation based on the feedback Nikita and Nicolas provided. Thus, I'd
> like to start the discussion phase.
>
> Regards:
> Máté
Hi,
Two remarks:
(1) The RFC is about return type of non-final methods. The same issue might arise for typed
properties, whose type are supposed to be invariant under inheritance; although it is admittedly
rarely useful to redeclare them in the subclass. Should typed properties be handled in the same way,
or should we simply recommend to not redeclare properties?
(2) Nicolas Grekas has beaten about E_STRICT (E_DEPRECATED is fine in this case). I’m just adding
this: By reintroducing E_STRICT you are effectively reverting the [Reclassify E_STRICT notices] RFC,
whose motivation was to “simplify our error model and resolve the currently unclear role of strict
standards notices”. Thus, you should propose a clear role of those resurrected E_STRICT notices,
that justifies the complication of the error model.
[Reclassify E_STRICT notices]: https://wiki.php.net/rfc/reclassify_e_strict
—Claude
Thread (18 messages)