Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony 2.5.3 and PHP 5.6.0: incompatibility issues?

I don't know if this is a Symfony issue or a FOSUserBundle issue so I'll report here and hope get some help. I have two development instances:

CentOS 6.5, PHP 5.5.16, MySQL 5.5.37
CentOS 7, PHP 5.6.0, MariaDB 5.5.37

I tried the same project in both instances and by same project I mean the same: copied without any vendor and in both instances run "composer update" at first. After composer updates the vendor I tried to access admin area, which is handled by, FOSUserBundle and surprise in the first instance it works without any problem but in the second one it does not work and I get this error:

Error! Warning: Erroneous data format for unserializing 'Tanane\UserBundle\Entity\User' in /var/www/html/tanane/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php line 872

Can any give me some advice around this? Is a Symfony bug or a FOSUserBundle bug? Or it's other thing and I don't see it?

like image 881
ReynierPM Avatar asked Sep 02 '14 00:09

ReynierPM


1 Answers

Yes, this is a known problem, though it's not in FOSUserBundle. This problem is caused by Doctrine 2, the deserialization is broken there on creating a ClassMetadataInfo.

However, fixing this problem involves introducing some incompatibilities in Doctrine's architecture, so this won't be fixed until Doctrine 2.5 release at least.

Currently, the options are to switch back to PHP 5.5 or less or use a master version of Doctrine (the pull request fixing this does not seem to be tagged yet)

See this Doctrine Jira ticket for more info.

like image 84
kix Avatar answered Nov 19 '22 17:11

kix