Skip to content

Commit 8b63319

Browse files
committed
fix: format upgrade guide
1 parent eb24fe8 commit 8b63319

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

core/upgrade-guide.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ By doing so you won't get access to legacy services and this will probably break
1818

1919
1. Update the code to 2.7: `composer require api-platform/core:^2.7`
2020
2. Take care of the deprecations and update your code to the new interfaces, documented on this page.
21-
4. Use the [`api:upgrade-resource` command](#the-upgrade-command)
2221
3. Switch the `metadata_backward_compatibility_layer` flag to `false`
22+
4. Use the [`api:upgrade-resource` command](#the-upgrade-command)
23+
24+
Read more about the `metadata_backward_compatibility_layer` flag [here](#the-metadata_backward_compatibility_layer-flag).
2325

2426
## Changes
2527

@@ -162,8 +164,13 @@ In 2.7 the `metadata_backward_compatibility_layer` flag is set to `true`.
162164
This means that all the legacy services will still work just as they used
163165
to work in 2.6 (for example `PropertyMetadataFactoryInterface` or
164166
`ResourceMetadataFactoryInterface`). When updating we advise to first
165-
resolve the deprecations then to set this flag to `false` to use the
166-
new metadata system.
167+
resolve the deprecations then to set this flag to `false` to use the new metadata system.
168+
169+
When `metadata_backward_compatibility_layer` is set to `false`:
170+
- there's still a bridge with the legacy `ApiPlatform\Core\Annotation\ApiResource` and old metadata will still work
171+
- the deprecated symfony services will have their interface changed (for example `ApiPlatform\Core\Api\IriConverterInterface` will be `ApiPlatform\Api\IriConverterInterface`) and it may break your dependency injection.
172+
- the new metadata system is available `ApiPlatform\Metadata\ApiResource`
173+
167174

168175
### SearchFilter
169176

@@ -213,8 +220,9 @@ class Book {}
213220
```
214221

215222
See also the respective documentation:
216-
- [State Processor](./state-processors.md)
217-
- [State Provider](./state-providers.md)
223+
224+
- [State Processor](./state-processors.md)
225+
- [State Provider](./state-providers.md)
218226

219227
## DataTransformers and DTO support
220228

0 commit comments

Comments
 (0)