报错:
Fatal error: Declaration of App\DataFixtures\AppFixtures::load(Doctrine\Common\Persistence\ObjectManager $manager) must be compatible with Doctrine\Common\DataFixtures\FixtureInterface::load(Doctrine\Persistence\ObjectManager $manager) in E:\wamp64\www\vrPlatform\src\DataFixtures\AppFixtures.php on line 8
问题背景:
symfony项目 composer update 后
解决:
- 删除 \src\DataFixtures目录
- bin/console cache:clear
-
use Doctrine\Common\Persistence\ManagerRegistry; 改为: use Doctrine\Persistence\ManagerRegistry; // 参考:https://stackoverflow.com/questions/63688919/error-argument-1-passed-to-app-repository-foorepository-construct-must-be
原因:
symfony版本差异