我正在尝试安装 api-platform,但启动 Composer 安装后遇到问题:
我按照官方文档进行安装:
composer req api
当我启动服务器或尝试运行时composer install出现此错误:
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
然后是一个警告:
[WARNING] Some commands could not be registered:
!!
!!
!! In DoctrineOrmPropertyMetadataFactory.php line 31:
!!
!! Argument 1 passed to ApiPlatform\Core\Bridge\Doctrine\Orm\Metadata\Property
!! \DoctrineOrmPropertyMetadataFactory::__construct() must be an instance of D
!! octrine\Common\Persistence\ManagerRegistry, instance of Doctrine\Bundle\Doc
!! trineBundle\Registry given, called in /var/www/test-api-sf/var/cache/dev/Co
!! ntainerPA69O1T/App_KernelDevDebugContainer.php on line 1040
!!
!!
!! In DoctrineOrmPropertyMetadataFactory.php line 31:
!!
!! Argument 1 passed to ApiPlatform\Core\Bridge\Doctrine\Orm\Metadata\Property
!! \DoctrineOrmPropertyMetadataFactory::__construct() must be an instance of D
!! octrine\Common\Persistence\ManagerRegistry, instance of Doctrine\Bundle\Doc
!! trineBundle\Registry given, called in /var/www/test-api-sf/var/cache/dev/Co
!! ntainerPA69O1T/App_KernelDevDebugContainer.php on line 1040
为什么我会收到此错误,我可以采取什么措施来避免它?
侃侃无极
喵喵时光机
qq_花开花谢_0
RISEBY