diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php index 7ba5839f59eab..06fc50e5df39e 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php @@ -571,6 +571,7 @@ public static function typeProvider(): iterable yield ['arrayOfMixed', Type::dict(Type::mixed()), null, null]; yield ['listOfStrings', Type::list(Type::string()), null, null]; yield ['self', Type::object(Dummy::class), null, null]; + yield ['collectionAsObject', Type::collection(Type::object(DummyCollection::class), Type::string(), Type::int()), null, null]; } /** diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php index a1dd8d54152f5..109d54f0898cf 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php @@ -594,6 +594,7 @@ public static function typesProvider(): iterable yield ['self', Type::object(Dummy::class)]; yield ['rootDummyItems', Type::list(Type::object(RootDummyItem::class))]; yield ['rootDummyItem', Type::object(RootDummyItem::class)]; + yield ['collectionAsObject', Type::collection(Type::object(DummyCollection::class), Type::string(), Type::int())]; } public function testParamTagTypeIsOmitted()