Symfony 2.5.3 and PHP 5.6.0: incompatibility issues?
Asked Answered
D

1

8

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?

Docila answered 2/9, 2014 at 0:30 Comment(0)
C
14

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.

Chondriosome answered 2/9, 2014 at 6:27 Comment(2)
Thank you ! This answer is a lifesaver. I have been getting unserialization issues with my Symfony2 project which I was trying to run on PHP 5.6 and couldn't find out why. I tried with 5.4 and it now runs perfectly.Pasta
Doctrine don't use JIRA any more and have migrated all issues to Github issues. That last link 404s, therefore; the equivalent on GH is github.com/doctrine/doctrine2/issues/3897.Kinch

© 2022 - 2024 — McMap. All rights reserved.