Symfony 2.5.3和PHP 5.6.0:不兼容问题? [英] Symfony 2.5.3 and PHP 5.6.0: incompatibility issues?

查看:96
本文介绍了Symfony 2.5.3和PHP 5.6.0:不兼容问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这是Symfony问题还是FOSUserBundle问题,因此我将在此处报告并希望获得帮助.我有两个开发实例:

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

我在两个实例中都尝试了相同的项目,对于相同的项目,我的意思是相同的:没有任何供应商进行复制,并且在两个实例中都首先运行"composer update".在作曲家更新供应商后,我尝试访问由FOSUserBundle处理的管理区域,并且在第一个实例中感到惊讶,该实例没有任何问题,但是在第二个实例中,它却无法正常工作,并且出现了此错误:

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:

错误!警告:用于反序列化的错误数据格式 的"Tanane \ UserBundle \ Entity \ User" /var/www/html/tanane/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php 872行

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

有人可以给我一些建议吗?是Symfony错误还是FOSUserBundle错误?还是其他东西,我看不到?

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?

推荐答案

是的,这是一个已知问题,尽管它不在FOSUserBundle中.此问题是由教义2引起的,在创建ClassMetadataInfo时,反序列化已中断.

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.

但是,解决此问题涉及在Doctrine的体系结构中引入一些不兼容性,因此,至少要在Doctrine 2.5发行后才能解决.

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.

当前,选项是切换回PHP 5.5或更低版本或使用Doctrine的主版本(

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)

有关更多信息,请参见这张Joctrine吉拉门票.

See this Doctrine Jira ticket for more info.

这篇关于Symfony 2.5.3和PHP 5.6.0:不兼容问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆