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
Note that builtinTypes are computed automatically from php types.
148
+
Note that `builtinTypes` are computed automatically from PHP types.
149
149
150
150
For example:
151
151
@@ -158,34 +158,35 @@ class Book
158
158
159
159
Will compute: `builtinTypes: ['string', Isbn::class]`
160
160
161
-
### The `metadata_backward_compatibility_layer` flag
161
+
### The `metadata_backward_compatibility_layer` Flag
162
162
163
163
In 2.7 the `metadata_backward_compatibility_layer` flag is set to `true`.
164
164
This means that all the legacy services will still work just as they used
165
165
to work in 2.6 (for example `PropertyMetadataFactoryInterface` or
166
-
`ResourceMetadataFactoryInterface`). When updating we advise to first
167
-
resolve the deprecations then to set this flag to `false` to use the new metadata system.
166
+
`ResourceMetadataFactoryInterface`).
167
+
When updating we advise to first resolve the deprecations then to set this
168
+
flag to `false` to use the new metadata system.
168
169
169
170
When `metadata_backward_compatibility_layer` is set to `false`:
170
171
- 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 deprecated Symfony services will have their interface changed (for example `ApiPlatform\Core\Api\IriConverterInterface`
173
+
will be `ApiPlatform\Api\IriConverterInterface`) and it may break your dependency injection.
172
174
- the new metadata system is available `ApiPlatform\Metadata\ApiResource`
173
175
174
-
175
176
### SearchFilter
176
177
177
178
If you want to use the new namespaces for the search filter
178
179
(`ApiPlatform\Doctrine\Orm\Filter\SearchFilter` instead of`ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter` or
179
180
`ApiPlatform\Doctrine\Odm\Filter\SearchFilter`instead of`ApiPlatform\Core\Bridge\Doctrine\Odm\Filter\SearchFilter`) you
180
-
need to use the `metadata_backward_compatibility_layer` to false as this filter relies on the implementation
181
+
need to set the `metadata_backward_compatibility_layer` to `false` as this filter relies on the implementation
181
182
of the new `ApiPlatform\Api\IriConverterInterface`.
182
183
183
184
In 3.0 this flag will default to `false` and the legacy code will be removed.
184
185
185
-
## The upgrade command
186
+
## The Upgrade Command
186
187
187
188
The upgrade command will automatically upgrade the old `ApiPlatform\Core\Annotation\ApiResource` to `ApiPlatform\Metadata\ApiResource`.
Providers and Processors are replacing DataProviders and DataPersisters. We reduced their interface to only one method and the class used by your operation can be specified directly within the metadata. Using doctrine, a default resource would use these:
203
+
Providers and Processors are replacing DataProviders and DataPersisters.
204
+
We reduced their interface to only one method and the class used by your operation can be specified directly within the metadata.
205
+
Using Doctrine, a default resource would use these:
203
206
204
207
```php
205
208
@@ -224,8 +227,9 @@ See also the respective documentation:
224
227
- [State Processor](./state-processors.md)
225
228
- [State Provider](./state-providers.md)
226
229
227
-
## DataTransformers and DTO support
230
+
## DataTransformers and DTO Support
228
231
229
-
Data transformers have been deprecated, instead you can still document the `output` or the `input` DTO. Then, just handle the `input` in a custom [State Processor](./state-processors.md) or return another `output` in a custom [State Provider](./state-providers.md).
232
+
Data transformers have been deprecated, instead you can still document the `output` or the `input` DTO.
233
+
Then, just handle the `input` in a custom [State Processor](./state-processors.md) or return another `output` in a custom [State Provider](./state-providers.md).
230
234
231
235
The [dto documentation](./dto.md) has been adapted accordingly.
0 commit comments