diff --git a/src/Doctrine/Common/Tests/State/PersistProcessorTest.php b/src/Doctrine/Common/Tests/State/PersistProcessorTest.php index f510a661e7e..3d96380f8df 100644 --- a/src/Doctrine/Common/Tests/State/PersistProcessorTest.php +++ b/src/Doctrine/Common/Tests/State/PersistProcessorTest.php @@ -61,7 +61,7 @@ public function testPersistIfEntityAlreadyManaged(): void $objectManagerProphecy->persist($dummy)->shouldNotBeCalled(); $objectManagerProphecy->flush()->shouldBeCalled(); $objectManagerProphecy->refresh($dummy)->shouldBeCalled(); - $objectManagerProphecy->getClassMetadata(Dummy::class)->willReturn(null)->shouldBeCalled(); + $objectManagerProphecy->getClassMetadata(Dummy::class)->willReturn(new ClassMetadata(Dummy::class))->shouldBeCalled(); $managerRegistryProphecy = $this->prophesize(ManagerRegistry::class); $managerRegistryProphecy->getManagerForClass(Dummy::class)->willReturn($objectManagerProphecy->reveal())->shouldBeCalled(); diff --git a/src/Doctrine/Common/composer.json b/src/Doctrine/Common/composer.json index 2da0c0047af..3cf521001cd 100644 --- a/src/Doctrine/Common/composer.json +++ b/src/Doctrine/Common/composer.json @@ -28,7 +28,7 @@ "api-platform/state": "^4.1.11", "doctrine/collections": "^2.1", "doctrine/common": "^3.2.2", - "doctrine/persistence": "^3.2" + "doctrine/persistence": "^3.2 || ^4.0" }, "require-dev": { "doctrine/mongodb-odm": "^2.10",