Re: BC break in 5.4.29 and 5.5.13
| From: | Remi Collet | Date: | Wed, 04 Jun 2014 05:24:05 +0000 |
| Subject: | Re: BC break in 5.4.29 and 5.5.13 | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-74736@lists.php.net to get a copy of this message | ||
Le 03/06/2014 21:04, Jeremy Mikola a écrit :
> On Tue, Jun 3, 2014 at 1:11 PM, Marco Pivetta <ocramius@gmail.com> wrote:
>
>>
>> It is going to be released, but yes, we actually have the expectation a
>> patch release for 5.4 and 5.5 with a rollback of this breakage.
>
>
> The original Doctrine PR that fixed this issue was
> https://github.com/doctrine/doctrine2/pull/1045, and Benjamin
> made some
> revisions in
>
> https://github.com/doctrine/doctrine2/commit/e577e7786796e9393df381f02221046dea6253a5
> (note: there is a typo there, as he actually should be checking for 5.4..29
> instead of 5.4.28). Based on the conversation above, it sounds like the
> revert will end up in 5.4.30 and 5.5.14, but we should expect the change
> for 5.6+.
Why don't you simply use newInstanceWithoutConstructor() as soon as
possible (5.4+) ?
I rather see unzerialize('O:%d:"%s":0:{}') as a workaround for old
version, instead of the opposite...
The fix is not really reverted, only a workaround for this regression,
and only for user class (so the segfault is fixed, for internal class).
FYI, a user of my repo have confirm (real app.) than
- doctrine + php 5.4.29 is broken
(the reason why I raised this issue here last Friday, I was aware of
PHPUnit problem for a long time, but was thinking it is 5.6 only)
- doctrine + initial patch works with php 5.4.29
- doctrine works with php 5.4.29 + patch
> In that case, Benjamin's commit needs to (a) fix the 5.4.x typo and (b) add
> another condition to utilize Reflection for 5.6+.
>
> Has PHPUnit already incorporated a work-around for this? At a glance, I
> didn't see anything in the main repository or
> https://github.com/sebastianbergmann/phpunit-mock-objects.
https://github.com/sebastianbergmann/phpunit-mock-objects/commit/1c68f1338f1940deb8265428bb2a7cbc5bc074b5
https://github.com/sebastianbergmann/phpunit-mock-objects/commit/ba8784d88ff4cc52cf9424d7f7c631ccd867019c
Remi.
P.S. FYI, in Fedora:
- Doctrine package includes the initial patch, so works
- PHPUnit package includes the upstream patch, so works
- PHP 5.5.13 includes the patch, so even a manually installed Doctrine
or PHPUnit will work.