PHP 5.5.13 breaks backwards compatibility
June 17, 2014
There’s a backwards compatibility break in PHP 5.5.13 (and PHP 5.4.29) affecting PHPUnit, Mockery, Doctrine, Symfony and probably a lot more.
Rafael Dohms triggered me with this Tweet;
So 5.5.13 broke BC and "a fix will be in 5.5.14".. WTF core, rollback and fix now there is no question about it…— Rafael Dohms (@rdohms) June 17, 2014
And I also ran into the issues with Mockery/PHPUnit;
Failed asserting that exception of type "PHPUnit_Framework_Error_Warning" matches expected exception "SymfonyComponentHttpKernelExceptionNotFoundHttpException". Message was: "Erroneous data format for unserializing 'Mockery_9_Symfony_Component_HttpFoundation_File_UploadedFile'".
I found the following sources that explain what happened:
- [PHP-DEV] BC break in 5.4.29 and 5.5.13 – PHP Internals
- Just a warning, 5.5.13 introduces a backwards incompatibility – Reddit
- Bug #67072 Echoing unserialized “SplFileObject” crash – bugs.php.net
- Upgrade note – GitHub
It’s advisable to not upgrade to PHP5.5.13 but wait for PHP5.5.14, it should be released soon.
Update June 19
PHP.net answered my question when 5.5.14 gets released;
@trafex @rdohms It's been decided not to make an out of band release but to do 5.5.14 at the normal time, which should be end of the month.— php.net (@official_php) June 18, 2014
Update June 29
The good news: PHP5.5.14 is released with the following note:
Please, note that this release also fixes a backward compatibility issue that has been detected in the PHP 5.5.13 release. Still, the fix in PHP 5.5.14 may break some very rare situations. As this tiny compatibility break involves security, and as security is our primary concern, we had to fix it. This concerns bug 67072. For more information about this bug and its actual resolution, please visit our upgrading guide. We apologize for any inconvenience you may have experienced with this behavior.
The bad news: It doesn’t fix the ‘Erroneous data format’ error!
I guess we’ll have to wait another month for the next release.
Update September 24
To wrap-up this post; I’m currently running PHP5.5.17 and the errors are gone! Hurray!Go back