diff --git a/Tests/Unit/Reflection/ClassSchema/Property/PropertyWithTypeDeclarationsTest.php b/Tests/Unit/Reflection/ClassSchema/Property/PropertyWithTypeDeclarationsTest.php index 006ffe55..c6d021c1 100644 --- a/Tests/Unit/Reflection/ClassSchema/Property/PropertyWithTypeDeclarationsTest.php +++ b/Tests/Unit/Reflection/ClassSchema/Property/PropertyWithTypeDeclarationsTest.php @@ -181,7 +181,9 @@ public function objectStorageWithArraySyntaxWithoutKeyValueTypeProperty(): void self::assertSame('object', $propertyTypes[0]->getBuiltinType()); self::assertSame(ObjectStorage::class, $propertyTypes[0]->getClassName()); - self::assertCount(0, $propertyTypes[0]->getCollectionKeyTypes()); + self::assertCount(2, $propertyTypes[0]->getCollectionKeyTypes()); + self::assertSame('string', $propertyTypes[0]->getCollectionKeyTypes()[0]->getBuiltinType()); + self::assertSame('int', $propertyTypes[0]->getCollectionKeyTypes()[1]->getBuiltinType()); self::assertCount(1, $propertyTypes[0]->getCollectionValueTypes()); self::assertSame('object', $propertyTypes[0]->getCollectionValueTypes()[0]->getBuiltinType()); diff --git a/Tests/Unit/Reflection/ClassSchema/Property/PropertyWithoutTypeDeclarationsTest.php b/Tests/Unit/Reflection/ClassSchema/Property/PropertyWithoutTypeDeclarationsTest.php index e9363f9b..4f92e9a1 100644 --- a/Tests/Unit/Reflection/ClassSchema/Property/PropertyWithoutTypeDeclarationsTest.php +++ b/Tests/Unit/Reflection/ClassSchema/Property/PropertyWithoutTypeDeclarationsTest.php @@ -193,8 +193,9 @@ public function objectStorageWithArraySyntaxWithoutKeyValueTypeProperty(): void self::assertTrue($propertyTypes[0]->isCollection()); self::assertSame('object', $propertyTypes[0]->getBuiltinType()); self::assertSame(ObjectStorage::class, $propertyTypes[0]->getClassName()); - - self::assertSame([], $propertyTypes[0]->getCollectionKeyTypes()); + self::assertCount(2, $propertyTypes[0]->getCollectionKeyTypes()); + self::assertSame('string', $propertyTypes[0]->getCollectionKeyTypes()[0]->getBuiltinType()); + self::assertSame('int', $propertyTypes[0]->getCollectionKeyTypes()[1]->getBuiltinType()); self::assertCount(1, $propertyTypes[0]->getCollectionValueTypes()); self::assertSame('object', $propertyTypes[0]->getCollectionValueTypes()[0]->getBuiltinType()); diff --git a/Tests/Unit/Reflection/ClassSchema/PropertyTest.php b/Tests/Unit/Reflection/ClassSchema/PropertyTest.php index a8e46e92..af0b4424 100644 --- a/Tests/Unit/Reflection/ClassSchema/PropertyTest.php +++ b/Tests/Unit/Reflection/ClassSchema/PropertyTest.php @@ -144,7 +144,9 @@ public function classSchemaDetectsTypeAndElementType(): void self::assertSame(ObjectStorage::class, $propertyType->getClassName()); - self::assertCount(0, $propertyType->getCollectionKeyTypes()); + self::assertCount(2, $propertyType->getCollectionKeyTypes()); + self::assertSame('string', $propertyType->getCollectionKeyTypes()[0]->getBuiltinType()); + self::assertSame('int', $propertyType->getCollectionKeyTypes()[1]->getBuiltinType()); self::assertCount(1, $propertyType->getCollectionValueTypes()); self::assertSame(DummyClassWithAllTypesOfProperties::class, $propertyType->getCollectionValueTypes()[0]->getClassName()); diff --git a/composer.json b/composer.json index e0f47cef..1bb5bf76 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "phpdocumentor/type-resolver": "^1.7.1", "symfony/dependency-injection": "^6.2", "symfony/property-access": "^6.2", - "symfony/property-info": "^6.2", + "symfony/property-info": "^6.2.11", "typo3/cms-core": "13.0.*@dev" }, "suggest": {