Skip to content

Commit 412b276

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: Undeprecate DoctrineExtractor::getTypes() clarify deprecations around annotated classes
2 parents 4de1563 + 9d3932a commit 412b276

File tree

5 files changed

+8
-22
lines changed

5 files changed

+8
-22
lines changed

UPGRADE-7.1.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ Mailer
9292
HttpKernel
9393
----------
9494

95-
* Deprecate `Extension::addAnnotatedClassesToCompile()` and related code infrastructure
95+
* The `Extension` class is marked as internal, extend the `Extension` class from the DependencyInjection component instead
96+
* Deprecate `Extension::addAnnotatedClassesToCompile()`
97+
* Deprecate `AddAnnotatedClassesToCachePass`
98+
* Deprecate the `setAnnotatedClassCache()` and `getAnnotatedClassesToCompile()` methods of the `Kernel` class
9699

97100
SecurityBundle
98101
--------------

src/Symfony/Bridge/Doctrine/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
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

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 0 additions & 5 deletions
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
}

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 0 additions & 14 deletions
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'));

src/Symfony/Component/HttpKernel/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ CHANGELOG
99
* Add `$validationFailedStatusCode` argument to `#[MapQueryParameter]` that allows setting a custom HTTP status code when validation fails
1010
* Add `NearMissValueResolverException` to let value resolvers report when an argument could be under their watch but failed to be resolved
1111
* Add `$type` argument to `#[MapRequestPayload]` that allows mapping a list of items
12-
* Deprecate `Extension::addAnnotatedClassesToCompile()` and related code infrastructure
12+
* The `Extension` class is marked as internal, extend the `Extension` class from the DependencyInjection component instead
13+
* Deprecate `Extension::addAnnotatedClassesToCompile()`
14+
* Deprecate `AddAnnotatedClassesToCachePass`
15+
* Deprecate the `setAnnotatedClassCache()` and `getAnnotatedClassesToCompile()` methods of the `Kernel` class
1316
* Add `#[MapUploadedFile]` attribute to fetch, validate, and inject uploaded files into controller arguments
1417

1518
7.0

0 commit comments

Comments
 (0)