Skip to content

Commit 665f39f

Browse files
committed
Undeprecate DoctrineExtractor::getTypes()
1 parent f05b043 commit 665f39f

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

CHANGELOG.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ CHANGELOG
44
7.1
55
---
66

7-
* Deprecate the `DoctrineExtractor::getTypes()` method, use `DoctrineExtractor::getType()` instead
87
* Allow `EntityValueResolver` to return a list of entities
98
* Add support for auto-closing idle connections
109
* Allow validating every class against `UniqueEntity` constraint

PropertyInfo/DoctrineExtractor.php

-5
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,8 @@ public function getType(string $class, string $property, array $context = []): ?
161161
};
162162
}
163163

164-
/**
165-
* @deprecated since Symfony 7.1, use "getType" instead
166-
*/
167164
public function getTypes(string $class, string $property, array $context = []): ?array
168165
{
169-
trigger_deprecation('symfony/property-info', '7.1', 'The "%s()" method is deprecated, use "%s::getType()" instead.', __METHOD__, self::class);
170-
171166
if (null === $metadata = $this->getMetadata($class)) {
172167
return null;
173168
}

Tests/PropertyInfo/DoctrineExtractorTest.php

-14
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,13 @@ public function testTestGetPropertiesWithEmbedded()
108108
}
109109

110110
/**
111-
* @group legacy
112-
*
113111
* @dataProvider legacyTypesProvider
114112
*/
115113
public function testExtractLegacy(string $property, ?array $type = null)
116114
{
117115
$this->assertEquals($type, $this->createExtractor()->getTypes(DoctrineDummy::class, $property, []));
118116
}
119117

120-
/**
121-
* @group legacy
122-
*/
123118
public function testExtractWithEmbeddedLegacy()
124119
{
125120
$expectedTypes = [new LegacyType(
@@ -137,9 +132,6 @@ public function testExtractWithEmbeddedLegacy()
137132
$this->assertEquals($expectedTypes, $actualTypes);
138133
}
139134

140-
/**
141-
* @group legacy
142-
*/
143135
public function testExtractEnumLegacy()
144136
{
145137
$this->assertEquals([new LegacyType(LegacyType::BUILTIN_TYPE_OBJECT, false, EnumString::class)], $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumString', []));
@@ -149,9 +141,6 @@ public function testExtractEnumLegacy()
149141
$this->assertNull($this->createExtractor()->getTypes(DoctrineEnum::class, 'enumCustom', []));
150142
}
151143

152-
/**
153-
* @group legacy
154-
*/
155144
public static function legacyTypesProvider(): array
156145
{
157146
// DBAL 4 has a special fallback strategy for BINGINT (int -> string)
@@ -251,9 +240,6 @@ public function testGetPropertiesCatchException()
251240
$this->assertNull($this->createExtractor()->getProperties('Not\Exist'));
252241
}
253242

254-
/**
255-
* @group legacy
256-
*/
257243
public function testGetTypesCatchExceptionLegacy()
258244
{
259245
$this->assertNull($this->createExtractor()->getTypes('Not\Exist', 'baz'));

0 commit comments

Comments
 (0)