2020use DeviceDetector \DeviceDetector ;
2121use Doctrine \Common \Collections \ArrayCollection ;
2222use Doctrine \ORM \EntityManagerInterface ;
23- use Doctrine \ORM \Mapping \ClassMetadataInfo ;
23+ use Doctrine \ORM \Mapping \ClassMetadata ;
2424use PHPUnit \Framework \Attributes \DataProvider ;
2525use PHPUnit \Framework \Attributes \TestDox ;
2626use RuntimeException ;
@@ -554,7 +554,7 @@ public static function dataProviderTestThatManyToManyAssociationMethodsWorksAsEx
554554
555555 $ items = array_filter (
556556 $ meta ->getAssociationMappings (),
557- static fn ($ mapping ): bool => $ mapping ['type ' ] === ClassMetadataInfo ::MANY_TO_MANY
557+ static fn ($ mapping ): bool => $ mapping ['type ' ] === ClassMetadata ::MANY_TO_MANY
558558 );
559559
560560 if (empty ($ items )) {
@@ -607,7 +607,7 @@ public static function dataProviderTestThatManyToOneAssociationMethodsWorksAsExp
607607
608608 $ items = array_filter (
609609 $ meta ->getAssociationMappings (),
610- static fn (array $ mapping ): bool => $ mapping ['type ' ] === ClassMetadataInfo ::MANY_TO_ONE
610+ static fn (array $ mapping ): bool => $ mapping ['type ' ] === ClassMetadata ::MANY_TO_ONE
611611 );
612612
613613 if (empty ($ items )) {
@@ -655,10 +655,10 @@ public static function dataProviderTestThatAssociationMethodsExists(): array
655655 ];
656656
657657 switch ($ mapping ['type ' ]) {
658- case ClassMetadataInfo ::ONE_TO_MANY :
659- case ClassMetadataInfo ::ONE_TO_ONE :
658+ case ClassMetadata ::ONE_TO_MANY :
659+ case ClassMetadata ::ONE_TO_ONE :
660660 break ;
661- case ClassMetadataInfo ::MANY_TO_ONE :
661+ case ClassMetadata ::MANY_TO_ONE :
662662 if ($ meta ->isReadOnly === false ) {
663663 $ methods [] = [
664664 'set ' . ucfirst ((string )$ mapping ['fieldName ' ]),
@@ -668,7 +668,7 @@ public static function dataProviderTestThatAssociationMethodsExists(): array
668668 ];
669669 }
670670 break ;
671- case ClassMetadataInfo ::MANY_TO_MANY :
671+ case ClassMetadata ::MANY_TO_MANY :
672672 self ::assertArrayHasKey ('fieldName ' , $ mapping );
673673
674674 $ singular = $ mapping ['fieldName ' ][mb_strlen ((string )$ mapping ['fieldName ' ]) - 1 ] === 's '
@@ -759,15 +759,15 @@ public static function dataProviderTestThatOneToManyAssociationMethodsWorksAsExp
759759
760760 $ items = array_filter (
761761 $ meta ->getAssociationMappings (),
762- static fn (array $ mapping ): bool => $ mapping ['type ' ] === ClassMetadataInfo ::ONE_TO_MANY ,
762+ static fn (array $ mapping ): bool => $ mapping ['type ' ] === ClassMetadata ::ONE_TO_MANY ,
763763 );
764764
765765 if (empty ($ items )) {
766766 $ output = [
767767 [null , null , []],
768768 ];
769769 } else {
770- $ output = array_merge (...array_values (array_map ($ iterator , $ items )));
770+ $ output = array_merge (...array_values (array_map ($ iterator , ( array ) $ items )));
771771 }
772772
773773 return $ output ;
0 commit comments