Doctrine ORM Fail(ClassMetadataFactory.php) [英] Doctrine ORM Fail (ClassMetadataFactory.php)

查看:127
本文介绍了Doctrine ORM Fail(ClassMetadataFactory.php)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我用silex 2.0更新了我的项目,并标记了以下错误映射解析错误:语法错误,/ var / www / vhosts / server.com.mx中的意外'[',expecting')' cmanager.server.com.mx/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php第80行。



这使某些表不全部包括不得不更改数据库管理员和工作完美。



有意见或建议。



谢谢


解决方案

我猜你在升级到silex 2.0时不小心升级了原则。如果您简单地运行 composer update 而不是 composer update silex / silex ,那么您将更新所有的作曲者依赖项,包括原则。



根据学说2.5,它不再支持php 5.3。您可以将服务器升级到PHP 5.4或更高版本来解决此问题。



或者,只需将版本降级到2.4版本。把它放到你的 composer.json 中:

 doctrine / orm :2.4。* 

修改:看起来学说2.5 isn'完全释放,你有你的最小稳定性标志设置为允许不稳定的版本?如果是这样,我也建议修复,你不应该使用dev builds一个生产项目。



编辑2 :现在发布。


recently I made an update of my project with silex 2.0 and mark me the following error mapping Parse error: syntax error, unexpected '[', expecting ')' in/var/www/vhosts/server.com.mx/cmanager.server.com.mx/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php on line 80.

This makes certain tables not all inclusive had to change database administrator and works perfect.

Have a comment or suggestion.

Thank You

解决方案

I'm guessing you accidentally upgraded doctrine when upgrading to silex 2.0. If you simply ran composer update instead of composer update silex/silex, you will update all your composer dependencies, including doctrine.

As of doctrine 2.5, it no longer supports php 5.3. You can upgrade your server to PHP 5.4 or later to fix this.

Alternatively, just downgrade doctrine to version 2.4. Put this into your composer.json:

"doctrine/orm": "2.4.*

Edit: It looks like doctrine 2.5 isn't fully released yet. Do you have your minimum-stability flag set to allow unstable versions? If so, I would also recommend fixing that. You should not be using dev builds in a production project.

Edit 2: It's released now.

这篇关于Doctrine ORM Fail(ClassMetadataFactory.php)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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