Trouble with importing annotations

前端 未结 6 1787
闹比i
闹比i 2021-01-11 15:14

I\'m working on a CodeIgniter project in which I\'m using Doctrine2 and the Symfony2 Validator component.

All my Doctrine2 entities use Doctrine\\ORM\\Mapping

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-11 16:03

    If you are testing and your tests fail because of this. Make sure you have the right autoload configured in your phpunit settings.

    For a very specific scenario, my problem was upgrading my symfony version whereas before i had the bootstrap.cache.php file, but on a new version, it is app/autoload. I had to change my phpunit.xml config file and set my bootstrap option to that file bootstrap="autoload.php"

提交回复
热议问题