Skip to content

Commit 9ad8d80

Browse files
committed
Flesh out migration guide and mark LegacyTypeResolver as deprecated
1 parent 0b871aa commit 9ad8d80

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

docs/guide/migrating-to-v6.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22

33
## Overview
44

5-
v6 is mostly a cleanup release with updated dependencies. The main changes are:
5+
`v6` is mostly a cleanup release, with updated dependencies. The main changes are:
66

7-
* Minimum required PHP version is now 8.2
8-
* ...
7+
* The minimum required PHP version is now 8.2
8+
* `radebatz/type-info-extras` is now a required dependency
9+
* `TypeInfoTypeResolver` now properly handles composite types (unions and intersections)
10+
* Some deprecations have been removed (see below)
11+
* The `MediaType::encoding` property now only accepts `Encoding` objects (BC break)
912

1013
For most installations upgrading should not require any changes.
1114

15+
## Type resolvers
16+
With `radebatz/type-info-extras` now being a required dependency, the `TypeInfoTypeResolver` is not the de-facto default
17+
resolver.
18+
19+
The `LegacyTypeResolver` can still be used as a drop-in replacement, but is now marked `deprecated` and will be removed
20+
in v7.
21+
1222
## Removed deprecated elements
1323
### Methods `\Openapi\Generator::getProcessors()` and `\Openapi\Generator::setProcessors()`
1424
Use `getProcessorPipeline()` and `setProcessorPipeline(new Pipeline(...))` methods instead

src/Type/LegacyTypeResolver.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
use OpenApi\Generator;
1313
use OpenApi\TypeResolverInterface;
1414

15+
/**
16+
* @deprecated use `TypeInfoTypeResolver` instead
17+
*/
1518
class LegacyTypeResolver extends AbstractTypeResolver
1619
{
1720
/** @inheritdoc */

0 commit comments

Comments
 (0)