Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] BC break in 5.4.29 and 5.5.13

Posted by Remi Collet 
Remi Collet
[PHP-DEV] BC break in 5.4.29 and 5.5.13
May 30, 2014 01:50PM
Hi.

Following http://news.php.net/php.internals/73957

This change breaks at least doctrine and phpunit.

Source code:
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php#L911
https://github.com/sebastianbergmann/phpunit-mock-objects/blob/master/src/Framework/MockObject/Generator.php#L274

Something like, (used to not call __construct) :

$object = unserialize(sprintf('O:%d:"%s":0:{}', strlen($className),
$className)

Big reproducer:

# pear channel-discover pear.horde.org
# pear install horde/Horde_Test
# pear install horde/Horde_Imap_Client
# pear download horde/Horde_Imap_Client
# tar xf Horde_Imap_Client-2.20.0.tgz
# cd Horde_Imap_Client-2.20.0/
# cd test/Horde/Imap/Client/
# wget https://phar.phpunit.de/phpunit.phar
# php phpunit.phar .
PHPUnit 4.1.0 by Sebastian Bergmann.

Configuration read from /root/Horde_Imap_Client-2.20.0/test/Horde/Imap/Client/phpunit.xml

................EEEEEEEEEEEEEEEEEEEEEEEEEEEE.................... 63 / 211 ( 29%)
..................................FF............................ 126 / 211 ( 59%)
SS............................................................. 189 / 211 ( 89%)
.......................

Time: 1.07 seconds, Memory: 18.50Mb

There were 28 errors:

1) Horde_Imap_Client_Cache_CacheTest::testGet
Erroneous data format for unserializing 'Mock_Horde_Imap_Client_Socket_1e0b6300'

/root/Horde_Imap_Client-2.20.0/test/Horde/Imap/Client/Cache/TestBase.php:36
phar:///root/Horde_Imap_Client-2.20.0/test/Horde/Imap/Client/phpunit.phar/phpunit/TextUI/Command.php:179
phar:///root/Horde_Imap_Client-2.20.0/test/Horde/Imap/Client/phpunit.phar/phpunit/TextUI/Command.php:132

2) Horde_Imap_Client_Cache_CacheTest::testGetCachedUids
Erroneous data format for unserializing 'Mock_Horde_Imap_Client_Socket_1e0b6300'
.....




Remi.
Remi Collet
[PHP-DEV] Re: BC break in 5.4.29 and 5.5.13
May 30, 2014 03:40PM
Anatol Belski
Re: [PHP-DEV] Re: BC break in 5.4.29 and 5.5.13
May 30, 2014 04:30PM
Hi Remi,

On Fri, May 30, 2014 15:35, Remi Collet wrote:
> Le 30/05/2014 13:45, Remi Collet a écrit :
>
>> Hi.
>>
>>
>> Following http://news.php.net/php.internals/73957
>>
>>
>> This change breaks at least doctrine and phpunit.
>>
>>
>> Source code:
>>
>>
> https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mappin
> g /ClassMetadataInfo.php#L911
>
>
> Fixed in doctrine
>
>
> https://github.com/doctrine/doctrine2/commit/93c276d059b40b0783ba9a24549a
> 8
> b135e257693#diff-093aaad4da679d0374260757bf7bafca
>
>>
> https://github.com/sebastianbergmann/phpunit-mock-objects/blob/master/src
> /
> Framework/MockObject/Generator.php#L274
>
>
> Fix in PHPUnit
>
>
> https://github.com/sebastianbergmann/phpunit-mock-objects/commit/1c68f133
> 8
> f1940deb8265428bb2a7cbc5bc074b5#diff-64dbbc1c21f9be2d92e2b715617ffe34
>
> https://github.com/sebastianbergmann/phpunit-mock-objects/commit/1c68f133
> 8
> f1940deb8265428bb2a7cbc5bc074b5#diff-64dbbc1c21f9be2d92e2b715617ffe34
>
>
thanks for the reproduce case. As discussed on the IRC, I'll be working on
a solution to minimize the BC break in 5.4 and 5.5. IMHO 5.6 is fine with
that "as is", as it's correct with the current specifications of the
Serializable and fixes wide range crash vulnerability.

Regards

Anatol

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Anatol Belski
Re: [PHP-DEV] Re: BC break in 5.4.29 and 5.5.13
June 03, 2014 02:50PM
On Fri, May 30, 2014 16:25, Anatol Belski wrote:
> Hi Remi,
>
>
> On Fri, May 30, 2014 15:35, Remi Collet wrote:
>
>> Le 30/05/2014 13:45, Remi Collet a écrit :
>>
>>
>>> Hi.
>>>
>>>
>>>
>>> Following http://news.php.net/php.internals/73957
>>>
>>>
>>>
>>> This change breaks at least doctrine and phpunit.
>>>
>>>
>>>
>>> Source code:
>>>
>>>
>>>
>> https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapp
>> in g /ClassMetadataInfo.php#L911
>>
>>
>> Fixed in doctrine
>>
>>
>>
>> https://github.com/doctrine/doctrine2/commit/93c276d059b40b0783ba9a2454
>> 9a
>> 8
>> b135e257693#diff-093aaad4da679d0374260757bf7bafca
>>
>>>
>> https://github.com/sebastianbergmann/phpunit-mock-objects/blob/master/s
>> rc /
>> Framework/MockObject/Generator.php#L274
>>
>>
>>
>> Fix in PHPUnit
>>
>>
>>
>> https://github.com/sebastianbergmann/phpunit-mock-objects/commit/1c68f1
>> 33
>> 8
>> f1940deb8265428bb2a7cbc5bc074b5#diff-64dbbc1c21f9be2d92e2b715617ffe34
>>
>> https://github.com/sebastianbergmann/phpunit-mock-objects/commit/1c68f1
>> 33
>> 8
>> f1940deb8265428bb2a7cbc5bc074b5#diff-64dbbc1c21f9be2d92e2b715617ffe34
>>
>>
> thanks for the reproduce case. As discussed on the IRC, I'll be working
> on a solution to minimize the BC break in 5.4 and 5.5. IMHO 5.6 is fine
> with that "as is", as it's correct with the current specifications of the
> Serializable and fixes wide range crash vulnerability.
>
>
> Regards
>
>
> Anatol
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
I've invented a patch fixing BC regarding this issue. It passes the
userspace classes but blocks the internal classes. While it's a must for
the stable 5.4 and 5.5, I still doubt we should put it into 5.6++. Even it
can work with userspace classes, it's highly inconsistent. For example - a
userclass implementing Serializable but throwing an exception in
unserialize() will behave wrong when instantiated that way.

Basically before I apply this fix - IMHO, it should go into 5.4 and 5.5
only, 5.6 should have clean behaviour. From the userspace perspective -
doctrine and phpunit have already fixed this using
ReflectionClass::newInstanceWithoutConstructor(), so that is fine with the
future. The fix should only go for legacy. So, what you say?

Regards

Anatol


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Jakub Zelenka
Re: [PHP-DEV] Re: BC break in 5.4.29 and 5.5.13
June 03, 2014 03:30PM
> Basically before I apply this fix - IMHO, it should go into 5.4 and 5.5
> only, 5.6 should have clean behaviour. From the userspace perspective -
> doctrine and phpunit have already fixed this using
> ReflectionClass::newInstanceWithoutConstructor(), so that is fine with the
> future. The fix should only go for legacy. So, what you say?
>
>
Would it be possible to do a quick releases of 5.4 and 5.5 that fixes the
BC break (it means 5.4.30 and 5.5.14)? I had to spent some time this
morning updating one project just to update Doctrine.

The thing is that not everyone knows about the issue and not everyone is
using "dev-master" in the composer...

Also updating composer is for some project with lots of depencies really
painful (especially if you don't have time to do it often... :) ). I don't
think that requiring it for php bug release is a good idea. It would be
great to do a new release as soon as possible and prevent any such issue.

Thanks

Jakub
Remi Collet
Re: [PHP-DEV] Re: BC break in 5.4.29 and 5.5.13
June 03, 2014 03:30PM
Le 03/06/2014 14:41, Anatol Belski a écrit :

> I've invented a patch fixing BC regarding this issue.

Tested. Work fine.
Thanks.

> It passes the
> userspace classes but blocks the internal classes. While it's a must for
> the stable 5.4 and 5.5,

Strongly agree.

> I still doubt we should put it into 5.6++. Even it
> can work with userspace classes, it's highly inconsistent. For example - a
> userclass implementing Serializable but throwing an exception in
> unserialize() will behave wrong when instantiated that way.
>
> Basically before I apply this fix - IMHO, it should go into 5.4 and 5.5
> only, 5.6 should have clean behaviour.

Agree.


Remi.

> From the userspace perspective -
> doctrine and phpunit have already fixed this using
> ReflectionClass::newInstanceWithoutConstructor(), so that is fine with the
> future. The fix should only go for legacy. So, what you say?
>
> Regards
>
> Anatol
>
>


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Johannes Schlüter
Re: [PHP-DEV] Re: BC break in 5.4.29 and 5.5.13
June 03, 2014 04:30PM
On Tue, 2014-06-03 at 14:23 +0100, Jakub Zelenka wrote:
> Would it be possible to do a quick releases of 5.4 and 5.5 that fixes
> the
> BC break (it means 5.4.30 and 5.5.14)?

such an issue btw. is a case where I can imagine a php.net frontpage
news entry by the RMs :)

johannes



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Benjamin Eberlei
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 05:10PM
@Julien: So what is the strategy now? This should be reverted ASAP.

After this my question, besides the PHPT, aren't any tests against php
libraries run before releases?
Especially this one would have broken PHPUnit already in any test using
mocks.

On Fri, May 30, 2014 at 1:45 PM, Remi Collet <[email protected]> wrote:

> Hi.
>
> Following http://news.php.net/php.internals/73957
>
> This change breaks at least doctrine and phpunit.
>
> Source code:
>
> https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php#L911
>
> https://github.com/sebastianbergmann/phpunit-mock-objects/blob/master/src/Framework/MockObject/Generator.php#L274
>
> Something like, (used to not call __construct) :
>
> $object = unserialize(sprintf('O:%d:"%s":0:{}', strlen($className),
> $className)
>
> Big reproducer:
>
> # pear channel-discover pear.horde.org
> # pear install horde/Horde_Test
> # pear install horde/Horde_Imap_Client
> # pear download horde/Horde_Imap_Client
> # tar xf Horde_Imap_Client-2.20.0.tgz
> # cd Horde_Imap_Client-2.20.0/
> # cd test/Horde/Imap/Client/
> # wget https://phar.phpunit.de/phpunit.phar
> # php phpunit.phar .
> PHPUnit 4.1.0 by Sebastian Bergmann.
>
> Configuration read from
> /root/Horde_Imap_Client-2.20.0/test/Horde/Imap/Client/phpunit.xml
>
> ...............EEEEEEEEEEEEEEEEEEEEEEEEEEEE.................... 63 / 211
> ( 29%)
> .................................FF............................ 126 / 211
> ( 59%)
> SS............................................................. 189 / 211
> ( 89%)
> ......................
>
> Time: 1.07 seconds, Memory: 18.50Mb
>
> There were 28 errors:
>
> 1) Horde_Imap_Client_Cache_CacheTest::testGet
> Erroneous data format for unserializing
> 'Mock_Horde_Imap_Client_Socket_1e0b6300'
>
> /root/Horde_Imap_Client-2.20.0/test/Horde/Imap/Client/Cache/TestBase.php:36
>
> phar:///root/Horde_Imap_Client-2.20.0/test/Horde/Imap/Client/phpunit.phar/phpunit/TextUI/Command.php:179
>
> phar:///root/Horde_Imap_Client-2.20.0/test/Horde/Imap/Client/phpunit.phar/phpunit/TextUI/Command.php:132
>
> 2) Horde_Imap_Client_Cache_CacheTest::testGetCachedUids
> Erroneous data format for unserializing
> 'Mock_Horde_Imap_Client_Socket_1e0b6300'
> ....
>
>
>
>
> Remi.
>
>
>
Nikita Popov
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 05:30PM
On Tue, Jun 3, 2014 at 5:07 PM, Benjamin Eberlei <[email protected]>
wrote:

> @Julien: So what is the strategy now? This should be reverted ASAP.
>
> After this my question, besides the PHPT, aren't any tests against php
> libraries run before releases?
> Especially this one would have broken PHPUnit already in any test using
> mocks.
>

We were aware of the BC break before release (see
http://marc.info/?l=php-internals&m=139932135130155&w=2), but it looks like
the issue was forgotten after some initial discussion.

Nikita
Johannes Schlüter
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 06:00PM
On Tue, 2014-06-03 at 17:07 +0200, Benjamin Eberlei wrote:
>
> After this my question, besides the PHPT, aren't any tests against php
> libraries run before releases?

We send out RCs two weeks before a release, but receive barely any
feedback. I'd love if external projects would verify those and raise a
red flag ...

johannes


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Marco Pivetta
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 06:10PM
On 3 June 2014 17:55, Johannes Schlüter <[email protected]> wrote:

> We send out RCs two weeks before a release, but receive barely any
> feedback. I'd love if external projects would verify those and raise a
> red flag ...


We don't have the resources to test against RCs, and we don't have any CI
environment on our own except for travis-ci (which is what most projects
currently use).

Maybe push a `php-nightly` binary to the Travis folks instead? We'd gladly
test against that, and even if people won't report immediately, the travis
API is simple enough to allow mining on the builds to discover problems
eagerly.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/
Johannes Schlüter
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 06:10PM
On Tue, 2014-06-03 at 17:59 +0200, Marco Pivetta wrote:
> On 3 June 2014 17:55, Johannes Schlüter <[email protected]>
> wrote:
>
> We send out RCs two weeks before a release, but receive barely
> any
> feedback. I'd love if external projects would verify those and
> raise a
> red flag ...
>
>
> We don't have the resources to test against RCs, and we don't have any
> CI environment on our own except for travis-ci (which is what most
> projects currently use).
>
> Maybe push a `php-nightly` binary to the Travis folks instead? We'd
> gladly test against that, and even if people won't report immediately,
> the travis API is simple enough to allow mining on the builds to
> discover problems eagerly.
>
Nightly testing (or push testing) I see on our side. The issue with
testing applications is that we need the time from the individual
project maintainers. Not knowing the application it often is quite hard
to dig down what in the underlying systems broke. Project maintainers
typically an pinpoint this faster.

Speaking about resources: The core PHP team is very small, way to small
to keep up with a relevant amount of projects all moving.

johannes



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Marco Pivetta
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 06:20PM
On 3 June 2014 18:07, Johannes Schlüter <[email protected]> wrote:

> Nightly testing (or push testing) I see on our side. The issue with
> testing applications is that we need the time from the individual
> project maintainers. Not knowing the application it often is quite hard
> to dig down what in the underlying systems broke. Project maintainers
> typically an pinpoint this faster.
>

Pushing a "nightly" package to Travis would solve this issue almost
entirely.


> Speaking about resources: The core PHP team is very small, way to small
> to keep up with a relevant amount of projects all moving.
>

There's an already working test suite by the HHVM folks at
https://github.com/facebook/hhvm/blob/1ecb4443d95c2e2659028f148083dd5c85f2099b/hphp/test/frameworks/frameworks.yaml

In the eventuality in which PHP-SRC retains control over the CI environment
that runs the framework tests, this suite could be reused. The problem is
that it actually takes days to run all those tests, and I don't know if the
hardware is available.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/
Andrea Faulds
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 06:30PM
On 3 Jun 2014, at 17:17, Marco Pivetta <[email protected]> wrote:

> In the eventuality in which PHP-SRC retains control over the CI environment
> that runs the framework tests, this suite could be reused. The problem is
> that it actually takes days to run all those tests, and I don't know if the
> hardware is available.

Perhaps just a small, frequently-used subset could be tested?

--
Andrea Faulds
http://ajf.me/





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Julien Pauli
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 06:30PM
On Tue, Jun 3, 2014 at 6:17 PM, Marco Pivetta <[email protected]> wrote:
> On 3 June 2014 18:07, Johannes Schlüter <[email protected]> wrote:
>>
>> Nightly testing (or push testing) I see on our side. The issue with
>> testing applications is that we need the time from the individual
>> project maintainers. Not knowing the application it often is quite hard
>> to dig down what in the underlying systems broke. Project maintainers
>> typically an pinpoint this faster.
>
>
> Pushing a "nightly" package to Travis would solve this issue almost
> entirely.
>
>>
>> Speaking about resources: The core PHP team is very small, way to small
>> to keep up with a relevant amount of projects all moving.
>
>
> There's an already working test suite by the HHVM folks at
> https://github.com/facebook/hhvm/blob/1ecb4443d95c2e2659028f148083dd5c85f2099b/hphp/test/frameworks/frameworks.yaml
>
> In the eventuality in which PHP-SRC retains control over the CI environment
> that runs the framework tests, this suite could be reused. The problem is
> that it actually takes days to run all those tests, and I don't know if the
> hardware is available.

I agree we should run our tests against well known tested projects,
such as PHPUnit , Doctrine or other.

That's in a perfect world though.

Julien.P

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Julien Pauli
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 06:50PM
I suggest we merge Anatol's patch to 5.5 so it's gonna be in 5.5.14 and up.

I'm not really fan to merge it to 5.6. The patch fixing the BC
introduces inconsistencies between internal and userland classes, and
I don't really like that.
Other thoughts perhaps ?


Julien

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Remi Collet
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 07:00PM
Le 03/06/2014 17:55, Johannes Schlüter a écrit :
> On Tue, 2014-06-03 at 17:07 +0200, Benjamin Eberlei wrote:
>>
>> After this my question, besides the PHPT, aren't any tests against php
>> libraries run before releases?
>
> We send out RCs two weeks before a release, but receive barely any
> feedback. I'd love if external projects would verify those and raise a
> red flag ...

And the bug is known by upstream project.

It is fixed in Doctrine and in PHPUnit.

Both project doesn't seems to think it is important as they don't
publish any new version with the fix included.


My 0,02€

Remi.


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Marco Pivetta
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 07:20PM
On 3 June 2014 18:58, Remi Collet <[email protected]> wrote:

> And the bug is known by upstream project.
>

We didn't know of the bug/problem until it landed in the release


> It is fixed in Doctrine and in PHPUnit.
>
> Both project doesn't seems to think it is important as they don't
> publish any new version with the fix included.
>

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.
Even if we fix the bug ourselves, this is going to break apps that receive
a PHP upgrade and not an upgrade of the library dependencies.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/
Jeremy Mikola
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 03, 2014 09:10PM
On Tue, Jun 3, 2014 at 1:11 PM, Marco Pivetta <[email protected]> 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+.

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.

--
jeremy mikola
Remi Collet
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 04, 2014 07:30AM
Le 03/06/2014 21:04, Jeremy Mikola a écrit :
> On Tue, Jun 3, 2014 at 1:11 PM, Marco Pivetta <[email protected]> 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.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Benjamin Eberlei
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 04, 2014 08:20AM
Remi,

I didn't have time to check the implications of
"newInstanceWithoutConstructor", i didn't want to merge that directly into
our stable branches. Plans to migrate to the function for php5.4++ exist
though.

greetings
Benjamin


On Wed, Jun 4, 2014 at 7:24 AM, Remi Collet <[email protected]> wrote:

> Le 03/06/2014 21:04, Jeremy Mikola a écrit :
> > On Tue, Jun 3, 2014 at 1:11 PM, Marco Pivetta <[email protected]>
> 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.
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Julien Pauli
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 04, 2014 10:00AM
On Wed, Jun 4, 2014 at 8:03 AM, Benjamin Eberlei <[email protected]> wrote:
> Remi,
>
> I didn't have time to check the implications of
> "newInstanceWithoutConstructor", i didn't want to merge that directly into
> our stable branches. Plans to migrate to the function for php5.4++ exist
> though.

newInstanceWithoutConstructor() has been introducted into PHP to
address exactly the
use-cases we are considering in this topic. The Doctrine one for example.

Julien

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Matteo Beccati
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 04, 2014 01:50PM
Hi Julien, Marco,

On 03/06/2014 18:26, Julien Pauli wrote:
> I agree we should run our tests against well known tested projects,
> such as PHPUnit , Doctrine or other.
>
> That's in a perfect world though.

I finished setting up a similar CI environment for the project I work
on, so that the Revive Adserver test suite is also run with latest PHP
5.4, 5.5, 5.6, master, phpng (disabled atm) and int64 every night.

I've sent an email about it to php-qa just a few days ago.

I could set up some jobs for a few more open source projects if they are
not extremely resource hungry.


Cheers
--
Matteo Beccati

Development & Consulting - http://www.beccati.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Matteo Beccati
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 04, 2014 04:00PM
On 04/06/2014 13:45, Matteo Beccati wrote:
> I could set up some jobs for a few more open source projects if they are
> not extremely resource hungry.

PHPUnit was fairly easy:

https://revive.beccati.com/bamboo/browse/PHPUN-LATE-2

It currently fails on 5.4, 5.5, phpng from last night.


Cheers
--
Matteo Beccati

Development & Consulting - http://www.beccati.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Julien Pauli
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 04, 2014 06:50PM
On Wed, Jun 4, 2014 at 3:53 PM, Matteo Beccati <[email protected]> wrote:
> On 04/06/2014 13:45, Matteo Beccati wrote:
>> I could set up some jobs for a few more open source projects if they are
>> not extremely resource hungry.
>
> PHPUnit was fairly easy:
>
> https://revive.beccati.com/bamboo/browse/PHPUN-LATE-2
>
> It currently fails on 5.4, 5.5, phpng from last night.

Ow, I missed the mail to qa so.

That's a nice job, I'll use that frequently before releases to ehance
our quality.

Thank you for helping in this critical part :-)

Julien

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Benjamin Eberlei
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 04, 2014 07:00PM
i know that, but its no reason for me to introduce this in a point bugfix
release, just to fix an upstream BC break, without testing it further.


On Wed, Jun 4, 2014 at 9:53 AM, Julien Pauli <[email protected]> wrote:

> On Wed, Jun 4, 2014 at 8:03 AM, Benjamin Eberlei <[email protected]>
> wrote:
> > Remi,
> >
> > I didn't have time to check the implications of
> > "newInstanceWithoutConstructor", i didn't want to merge that directly
> into
> > our stable branches. Plans to migrate to the function for php5.4++ exist
> > though.
>
> newInstanceWithoutConstructor() has been introducted into PHP to
> address exactly the
> use-cases we are considering in this topic. The Doctrine one for example.
>
> Julien
>
Benjamin Eberlei
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 10, 2014 02:00PM
any news?


On Wed, Jun 4, 2014 at 6:56 PM, Benjamin Eberlei <[email protected]>
wrote:

> i know that, but its no reason for me to introduce this in a point bugfix
> release, just to fix an upstream BC break, without testing it further.
>
>
> On Wed, Jun 4, 2014 at 9:53 AM, Julien Pauli <[email protected]> wrote:
>
>> On Wed, Jun 4, 2014 at 8:03 AM, Benjamin Eberlei <[email protected]>
>> wrote:
>> > Remi,
>> >
>> > I didn't have time to check the implications of
>> > "newInstanceWithoutConstructor", i didn't want to merge that directly
>> into
>> > our stable branches. Plans to migrate to the function for php5.4++ exist
>> > though.
>>
>> newInstanceWithoutConstructor() has been introducted into PHP to
>> address exactly the
>> use-cases we are considering in this topic. The Doctrine one for example.
>>
>> Julien
>>
>
>
Julien Pauli
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 10, 2014 02:20PM
On Tue, Jun 10, 2014 at 1:52 PM, Benjamin Eberlei <[email protected]> wrote:
> any news?
>

Patch will be included in next 5.5.14RCs and 5.5.14.

Julien

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Marco Pivetta
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 10, 2014 02:30PM
On 10 June 2014 14:17, Julien Pauli <[email protected]> wrote:

> Patch will be included in next 5.5.14RCs and 5.5.14.
>

What about 5.6.x? I'm getting failure reports from other folks that have
the beta installed...

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/
Julien Pauli
Re: [PHP-DEV] BC break in 5.4.29 and 5.5.13
June 10, 2014 02:40PM
On Tue, Jun 10, 2014 at 2:22 PM, Marco Pivetta <[email protected]> wrote:
> On 10 June 2014 14:17, Julien Pauli <[email protected]> wrote:
>>
>> Patch will be included in next 5.5.14RCs and 5.5.14.
>
>
> What about 5.6.x? I'm getting failure reports from other folks that have the
> beta installed...

I'm myself against merging it to 5.6

But for consistency, and if we follow our rules, the patch should also
be applied to 5.6
Ferenc, what do you think about it ?

Julien

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, only registered users may post in this forum.

Click here to login