"ApiPlatform \ Core \ Bridge \ Doctrine \ Orm \ Metadata \ Property \ DoctrineOrmPropertyMetadataFactory :: __ construct ()에 전달 된 인수 1은 인스턴스 여야합니다…"

Aug 28 2020

Api-Platform 설치 (또는 composer update기존 Api-Platform 설치에서 실행) 를 시도하는 동안 다음과 같은 오류가 발생합니다.

포착되지 않은 오류 : ApiPlatform \ Core \ Bridge \ Doctrine \ Orm \ Metadata \ Property \ DoctrineOrmPropertyMetadataFactory :: __ construct ()에 전달 된 인수 1은 Doctrine \ Common \ Persistence \ ManagerRegistry의 인스턴스 여야하며 Doctrine \ Bundle \ DoctrineBundle \ Registry의 인스턴스 여야합니다. , 1530 행의 App_KernelDevDebugContainer.php에서 호출 됨 [ "exception"=> TypeError {…}]

Api-Platform을 올바르게 설치하려면 어떻게해야합니까? 업데이트에 실패하는 이유는 무엇입니까?

답변

2 yivi Aug 28 2020 at 17:13

새 버전의 Api-Platform이 출시 될 때까지 (아마도 곧 출시 될 예정 임) 다음을 추가하여 문제를 피할 수 있습니다 composer.json.

"conflict": {
    "doctrine/common": ">= 3.0",
    "doctrine/persistence": "^1.0"
}

(이미 conflict키 가있을 가능성이 높으므로 기존 conflict규칙에 한 줄만 추가하면 됩니다.)

의 새 버전 doctrine/common이 출시되었으며 현재 버전의 Api-Platform이 호환되지 않습니다.

가까운 장래에 Api-Platform의 새 버전이 출시되면 해당 라인을 제거 할 수 있습니다.

다음 은 토론을 주시하고이 번들 수준에서 문제가 해결 된시기를 추적 할 수있는 문제입니다.


더 이상 필요하지 않습니다. 최신 Api-Platform 패키지를 사용하여 최신 Doctrine 패키지로 업데이트 할 수 있으며 모두 잘 작동합니다.