Re: BC break in 5.4.29 and 5.5.13
| From: | Benjamin Eberlei | Date: | Tue, 03 Jun 2014 15:07:30 +0000 |
| Subject: | Re: BC break in 5.4.29 and 5.5.13 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-74717@lists.php.net to get a copy of this message | ||
@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 <remi@php.net> 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.
>
>
>