Skip to content

Commit 912aafe

Browse files
Merge branch '7.3' into 7.4
* 7.3: [TypeInfo] Simple array should be array type Handle signals on text input [TwigBridge] Fix form constraint [Runtime] Reuse the already created Request object when the app needs it as argument returns a kernel Update validators.el.xlf Fix MoneyType: add missing step attribute when html5=true [Console] Preserve `--help` option when a command is not found [Messenger] Fix PHP 8.5 deprecation for pgsqlGetNotify() in PostgreSQL transport chore: PHP CS Fixer - do not use deprecated sets in config verify spanish translations with state needs-review-translation
2 parents a54158a + 3a0f08e commit 912aafe

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

Tests/Extractor/PhpStanExtractorTest.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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),

Tests/Fixtures/DummyUnionType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class DummyUnionType
4040
public $d;
4141

4242
/**
43-
* @var (Dummy<array<mixed, string>, (int | (\Traversable<DefaultValue>)[])> | ParentDummy | null)
43+
* @var (Dummy<array<string>, (int | (\Traversable<DefaultValue>)[])> | ParentDummy | null)
4444
*/
4545
public $e;
4646

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"php": ">=8.2",
2727
"symfony/deprecation-contracts": "^2.5|^3",
2828
"symfony/string": "^6.4|^7.0|^8.0",
29-
"symfony/type-info": "^7.3.5|^8.0"
29+
"symfony/type-info": "~7.3.8|^7.4.1|^8.0.1"
3030
},
3131
"require-dev": {
3232
"symfony/serializer": "^6.4|^7.0|^8.0",

0 commit comments

Comments
 (0)