You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/upgrade-guide.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,10 @@ By doing so you won't get access to legacy services and this will probably break
18
18
19
19
1. Update the code to 2.7: `composer require api-platform/core:^2.7`
20
20
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)
22
21
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).
23
25
24
26
## Changes
25
27
@@ -162,8 +164,13 @@ In 2.7 the `metadata_backward_compatibility_layer` flag is set to `true`.
162
164
This means that all the legacy services will still work just as they used
163
165
to work in 2.6 (for example `PropertyMetadataFactoryInterface` or
164
166
`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`
0 commit comments