Re: Re: [RFC] Allow throwing exceptions from __toString()
| From: | Nikita Popov | Date: | Tue, 14 May 2019 10:44:11 +0000 |
| Subject: | Re: Re: [RFC] Allow throwing exceptions from __toString() | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-105695@lists.php.net to get a copy of this message | ||
On Mon, May 13, 2019 at 5:08 PM Andreas Heigl <andreas@heigl.org> wrote:
> Hey Nikita, hey all
>
> Am 13.05.19 um 16:05 schrieb Nikita Popov:
> > On Tue, Apr 30, 2019 at 3:32 PM Nikita Popov <nikita.ppv@gmail.com>
> wrote:
> >
> >> Hi internals,
> >>
> >> I've already brought up this topic on list a couple of weeks ago... I've
> >> now updated the implementation based on feedback at the time, and turned
> >> this into a proper RFC:
> >>
> >> https://wiki.php.net/rfc/tostring_exceptions
> >>
> >> Regards,
> >> Nikita
> >>
> >
> > If there's no more comments here, I'd like to start voting on this RFC
> > tomorrow.
>
> As the change is technically a BC-break (as you state in the RFC) I
> wondered why the target is PHP7.4 and not 8.
>
> So far I didn't find a discussion on that but I might not have dug deep
> enough. So if this has already been discussed then I'd really appreciate
> a hint to the discussion.
>
The target is 7.4 because the BC break is minimal and largely theoretical.
I think the main affected code will be Symfony's existing hack around the
issue -- they'll have to disable the hack for PHP >= 7.4 and just use the
native support.
Nikita