Re: Fix ReflectionType::__toString() BC break
| From: | Nikita Popov | Date: | Wed, 21 Sep 2016 19:46:29 +0000 |
| Subject: | Re: Fix ReflectionType::__toString() BC break | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96081@lists.php.net to get a copy of this message | ||
On Wed, Sep 21, 2016 at 8:47 PM, Nicolas Grekas <nicolas.grekas@gmail.com>
wrote:
> > > See https://github.com/php/php-src/pull/2136
> >
> > On a technical note this is a potentially breaking change for C
> > extensions. Since it is a currently a
zend_bool its value
> > is
> > truthy/falsy; you are now applying specific meaning to values.
> >
> > Maybe someone else will have more insight into what might be affected
> > realistically, but this is one reason this was not implemented this
> > way to begin with.
> >
>
>
> Note that Nikita's proposal (i.e. stick to 7.0 behavior and ignore the
> "nullable" bit) is free from this problem yet really fine also as far as BC
> is concerned.
>
Here's a PR for the revert-to-7.0 + deprecate variant, in case we wish to
adopt it: https://github.com/php/php-src/pull/2137
Nikita