报错:
Fatal error: Declaration of AppDataFixturesAppFixtures::load(DoctrineCommonPersistenceObjectManager $manager) must be compatible with DoctrineCommonDataFixturesFixtureInterface::load(DoctrinePersistenceObjectManager $manager) in E:wamp64wwwvrPlatformsrcDataFixturesAppFixtures.php on line 8
问题背景:
symfony项目 composer update 后
解决:
- 删除 srcDataFixtures目录
- bin/console cache:clear
-
use DoctrineCommonPersistenceManagerRegistry; 改为: use DoctrinePersistenceManagerRegistry; // 参考:https://stackoverflow.com/questions/63688919/error-argument-1-passed-to-app-repository-foorepository-construct-must-be
原因:
symfony版本差异