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

本文是小编为大家收集整理的关于Symfony 2.5.3和PHP 5.6.0:不兼容的问题?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我不知道这是一个符号问题还是fosuserbundle问题,所以我在这里报告并希望得到一些帮助.我有两个开发实例:

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

我在两个实例中都尝试了同一项目,并且通过同一项目,我的意思是:不用任何供应商复制,在两个实例中,首先运行"作曲家更新".作曲家更新了我尝试访问管理区域的供应商之后,该区域是由FosuserBundle处理的,首先是毫无问题地工作的,但在第二个问题中,它不起作用,我遇到了此错误:

错误!警告:错误的数据格式,以进行不重新化 'tanane \ userbundle \ entity \ user'in /var/www/html/tanane/vendor/doctrine/orm/lib/doctrine/mapping/mmapping/classmetadatainfo.php 第872行

可以给我一些建议吗?是Symfony错误还是FosuserBundle错误?还是另一件事,我看不到它?

推荐答案

是的,这是一个已知的问题,尽管它不在FOSUserBundle中.这个问题是由学说2引起的,在创建ClassMetadataInfo>.

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

.

当前,选项是切换到PHP 5.5或更少或使用Doctrine的主版本(拉动请求修复此似乎还没有标记)

)

请参阅此学说Jira票有关更多信息.

本文地址:https://www.itbaoku.cn/post/2090757.html

问题描述

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?

推荐答案

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.