Doctrine ORM Fail (ClassMetadataFactory.php)

2019-05-22 04:08发布

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

1条回答
Anthone
2楼-- · 2019-05-22 04:36

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.

查看更多
登录 后发表回答