@@ -653,12 +653,12 @@ public static function typesProvider(): iterable
653653 yield ['foo2 ' , Type::float ()];
654654 yield ['foo3 ' , Type::callable ()];
655655 yield ['foo5 ' , Type::mixed ()];
656- yield ['files ' , Type::union (Type::list (Type::object (\SplFileInfo::class)), Type::resource ())];
656+ yield ['files ' , Type::union (Type::array (Type::object (\SplFileInfo::class)), Type::resource ())];
657657 yield ['bal ' , Type::object (\DateTimeImmutable::class)];
658658 yield ['parent ' , Type::object (ParentDummy::class)];
659- yield ['collection ' , Type::list (Type::object (\DateTimeImmutable::class))];
660- yield ['nestedCollection ' , Type::list (Type::list (Type::string ()))];
661- yield ['mixedCollection ' , Type::list ( )];
659+ yield ['collection ' , Type::array (Type::object (\DateTimeImmutable::class))];
660+ yield ['nestedCollection ' , Type::array (Type::array (Type::string ()))];
661+ yield ['mixedCollection ' , Type::array (Type:: mixed () )];
662662 yield ['a ' , Type::int ()];
663663 yield ['b ' , Type::nullable (Type::object (ParentDummy::class))];
664664 yield ['c ' , Type::nullable (Type::bool ())];
@@ -669,7 +669,7 @@ public static function typesProvider(): iterable
669669 yield ['h ' , Type::nullable (Type::string ())];
670670 yield ['i ' , Type::union (Type::int (), Type::string (), Type::null ())];
671671 yield ['j ' , Type::nullable (Type::object (\DateTimeImmutable::class))];
672- yield ['nullableCollectionOfNonNullableElements ' , Type::nullable (Type::list (Type::int ()))];
672+ yield ['nullableCollectionOfNonNullableElements ' , Type::nullable (Type::array (Type::int ()))];
673673 yield ['donotexist ' , null ];
674674 yield ['staticGetter ' , null ];
675675 yield ['staticSetter ' , null ];
@@ -678,7 +678,7 @@ public static function typesProvider(): iterable
678678 yield ['arrayOfMixed ' , Type::dict (Type::mixed ())];
679679 yield ['listOfStrings ' , Type::list (Type::string ())];
680680 yield ['self ' , Type::object (Dummy::class)];
681- yield ['rootDummyItems ' , Type::list (Type::object (RootDummyItem::class))];
681+ yield ['rootDummyItems ' , Type::array (Type::object (RootDummyItem::class))];
682682 yield ['rootDummyItem ' , Type::object (RootDummyItem::class)];
683683 yield ['collectionAsObject ' , Type::collection (Type::object (DummyCollection::class), Type::string (), Type::int ())];
684684 }
@@ -725,12 +725,12 @@ public static function typesWithNoPrefixesProvider(): iterable
725725 yield ['foo2 ' , Type::float ()];
726726 yield ['foo3 ' , Type::callable ()];
727727 yield ['foo5 ' , Type::mixed ()];
728- yield ['files ' , Type::union (Type::list (Type::object (\SplFileInfo::class)), Type::resource ())];
728+ yield ['files ' , Type::union (Type::array (Type::object (\SplFileInfo::class)), Type::resource ())];
729729 yield ['bal ' , Type::object (\DateTimeImmutable::class)];
730730 yield ['parent ' , Type::object (ParentDummy::class)];
731- yield ['collection ' , Type::list (Type::object (\DateTimeImmutable::class))];
732- yield ['nestedCollection ' , Type::list (Type::list (Type::string ()))];
733- yield ['mixedCollection ' , Type::list ( )];
731+ yield ['collection ' , Type::array (Type::object (\DateTimeImmutable::class))];
732+ yield ['nestedCollection ' , Type::array (Type::array (Type::string ()))];
733+ yield ['mixedCollection ' , Type::array (Type:: mixed () )];
734734 yield ['a ' , null ];
735735 yield ['b ' , null ];
736736 yield ['c ' , null ];
@@ -741,7 +741,7 @@ public static function typesWithNoPrefixesProvider(): iterable
741741 yield ['h ' , Type::nullable (Type::string ())];
742742 yield ['i ' , Type::union (Type::int (), Type::string (), Type::null ())];
743743 yield ['j ' , Type::nullable (Type::object (\DateTimeImmutable::class))];
744- yield ['nullableCollectionOfNonNullableElements ' , Type::nullable (Type::list (Type::int ()))];
744+ yield ['nullableCollectionOfNonNullableElements ' , Type::nullable (Type::array (Type::int ()))];
745745 yield ['donotexist ' , null ];
746746 yield ['staticGetter ' , null ];
747747 yield ['staticSetter ' , null ];
@@ -784,12 +784,12 @@ public static function typesWithCustomPrefixesProvider(): iterable
784784 yield ['foo2 ' , Type::float ()];
785785 yield ['foo3 ' , Type::callable ()];
786786 yield ['foo5 ' , Type::mixed ()];
787- yield ['files ' , Type::union (Type::list (Type::object (\SplFileInfo::class)), Type::resource ())];
787+ yield ['files ' , Type::union (Type::array (Type::object (\SplFileInfo::class)), Type::resource ())];
788788 yield ['bal ' , Type::object (\DateTimeImmutable::class)];
789789 yield ['parent ' , Type::object (ParentDummy::class)];
790- yield ['collection ' , Type::list (Type::object (\DateTimeImmutable::class))];
791- yield ['nestedCollection ' , Type::list (Type::list (Type::string ()))];
792- yield ['mixedCollection ' , Type::list ( )];
790+ yield ['collection ' , Type::array (Type::object (\DateTimeImmutable::class))];
791+ yield ['nestedCollection ' , Type::array (Type::array (Type::string ()))];
792+ yield ['mixedCollection ' , Type::array (Type:: mixed () )];
793793 yield ['a ' , null ];
794794 yield ['b ' , null ];
795795 yield ['c ' , Type::nullable (Type::bool ())];
@@ -800,7 +800,7 @@ public static function typesWithCustomPrefixesProvider(): iterable
800800 yield ['h ' , Type::nullable (Type::string ())];
801801 yield ['i ' , Type::union (Type::int (), Type::string (), Type::null ())];
802802 yield ['j ' , Type::nullable (Type::object (\DateTimeImmutable::class))];
803- yield ['nullableCollectionOfNonNullableElements ' , Type::nullable (Type::list (Type::int ()))];
803+ yield ['nullableCollectionOfNonNullableElements ' , Type::nullable (Type::array (Type::int ()))];
804804 yield ['nonNullableCollectionOfNullableElements ' , Type::array (Type::nullable (Type::int ()))];
805805 yield ['nullableCollectionOfMultipleNonNullableElementTypes ' , Type::nullable (Type::array (Type::union (Type::int (), Type::string ())))];
806806 yield ['donotexist ' , null ];
@@ -916,16 +916,16 @@ public function testExtractorUnionTypes(string $property, ?Type $type)
916916 public static function unionTypesProvider (): iterable
917917 {
918918 yield ['a ' , Type::union (Type::string (), Type::int ())];
919- yield ['b ' , Type::list (Type::union (Type::string (), Type::int ()))];
919+ yield ['b ' , Type::array (Type::union (Type::string (), Type::int ()))];
920920 yield ['c ' , Type::array (Type::union (Type::string (), Type::int ()))];
921921 yield ['d ' , Type::array (Type::array (Type::string ()), Type::union (Type::string (), Type::int ()))];
922922 yield ['e ' , Type::union (
923923 Type::generic (
924924 Type::object (Dummy::class),
925- Type::array (Type::string (), Type:: mixed () ),
925+ Type::array (Type::string ()),
926926 Type::union (
927927 Type::int (),
928- Type::list (Type::collection (Type::object (\Traversable::class), Type::object (DefaultValue::class))),
928+ Type::array (Type::collection (Type::object (\Traversable::class), Type::object (DefaultValue::class))),
929929 ),
930930 ),
931931 Type::object (ParentDummy::class),
0 commit comments