RE: [PHP-DEV] Regression between RC1 and RC2?
| From: | Derick Rethans | Date: | Sun, 16 Oct 2016 15:12:56 +0000 |
| Subject: | RE: [PHP-DEV] Regression between RC1 and RC2? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96389@lists.php.net to get a copy of this message | ||
On Sat, 8 Oct 2016, Anatol Belski wrote:
> From: me@daveyshafik.com [mailto:me@daveyshafik.com] On Behalf Of Davey Shafik
> >
> > On Fri, Oct 7, 2016 at 12:52 PM, Nikita Popov <nikita.ppv@gmail.com> wrote:
> >
> > > On Fri, Oct 7, 2016 at 9:31 PM, Derick Rethans <derick@php.net> wrote:
> > >
> > > > I was looking at Xdebug for PHP 7.1, and I ran into the
> > > > following inconsistency:
> > > >
> > > > https://3v4l.org/tHteN
> > > >
> > > > I first thought that Xdebug was messing up, but it seems like
> > > > it's different behaviour in PHP itself. As I clearly return an
> > > > array from __debugInfo, I don't think the new result is the
> > > > correct one.
> > > >
> > >
> > > This is due to https://github.com/php/php-src/commit/
> > >
> > > 2d8ab51576695630a7471ff829cc5ea10becdc0f, which landed in PHP-7.0
> > > as well.
> > >
> > > The problem is that __debugInfo currently is not able to handle
> > > exceptions gracefully. I think we should revert this change for
> > > now as it hides the fact that the underlying cause of the error is
> > > an exception.
> > >
> > Yes, we should not mask the exception. The behavior in 7.0/7.1.0RC1
> > is much better IMO.
> >
> > (As seen here: https://3v4l.org/EJpD4#v700)
> >
> As far as I understand the bug #73067, it was about avoiding the fatal
> error, not about avoiding the exception. Please correct if I'm wrong.
> But given this, the fatal error still persists while the exception is
> removed. It looks like it's doing the exact reversed to what one would
> expect - no fatal error and the exception can be catched.
>
> I see that it's not yet released in 7.0, so I would prefer to revert
> this in the release, at least. Hui, Nikita, do you think it's possible
> to improve this for 7.0 in a follow up? I would revert in 7.0.12 and
> there'll be room to fix it in the dev branch till 7.0.13. Otherwise
> I'd suggest to revert to the previous behavior in 7.0+ and do a fix in
> an appropriate higher branch.
Although things have changed, right now, it is still saying that
__debugInfo should return an array, and it is. That is a problem. I'd
rather have this reverted, then it showing an *incorrect* error message:
https://3v4l.org/EJpD4#v700
cheers,
Derick
--
https://derickrethans.nl | https://xdebug.org | https://dram.io
Like Xdebug? Consider a donation: https://xdebug.org/donate.php
twitter: @derickr and @xdebug