> > I've updated the RFC with the following things: > - The proposed error level is now E_DEPRECATED instead of E_STRICT > - I added a new section for exposing the behavior to userland (this is a > separate vote) >
To build on your approach and mixing it with the need we discussed for userland, I have a new proposal: We should replace the SuppressReturnTypeNotice by the TentativeReturnType one right away. The TentativeReturnType would mean: "I'm going to add a return type to this method in its next major". As a consequence, for child classes of internal methods, this would suppress the notice. For userland, there are already ways to declare the planned return type (aka @return in phpdoc), so we might not need any new way to declare this from the engine pov. As a corollary, adding this attribute should conflict with having a real return type. That would allow userland libs to immediately adopt the tag and be ready for PHP 8.1. WDYT?