v3.3.0
Read the API Platform 3.3 blog post for details on the 3.3 release.
Fixes
- fix(graphql): use normalization context to get item from IRI by @bkosun in #5915
- fix(doctrine): SearchFilterInterface case insensitive constants @soyuka in #6066
- fix(symfony)!: context stamp not serializable because of request object by @MariusJam in #6323
- fix(jsonapi): correct data path by @GwendolenLynch in #6273
- fix(jsonapi): return empty data array for empty relation by @GwendolenLynch in #6270
- fix(jsonapi): add missing "included" schema parts by @GwendolenLynch in #6277
- fix(jsonapi): exit loop when relationship class is found by @GwendolenLynch in #6320
- fix(jsonapi): re-add continue once relation is determined by @GwendolenLynch in #6325
- fix(metadata): index operations by @GwendolenLynch in #6272
- fix(graphql): nested collection for mongo by @jotwea in #6174
Features
- feat: allow to extend link handling by @soyuka in #6061
- feat(elasticsearch): filtering on nested fields by @jonnyeom in #5835
- feat: enable swagger UI deep linking by @coldic3 in #6051
- feat(graphql): support Enum collections by @jotwea in #5955
- feat(serializer): collect cache tags using a TagCollector by @usu in #5758
- feat(graphql): nested Collections by @jotwea in #6038
- feat(subresource): Link Security by @KDederichs in #5290
- feat(symfony): request and view kernel listeners by @soyuka in #6102
- feat(metadata): headers configuration by @soyuka in #6074
- feat: Paginators for Doctrine Collection & Selectable by @priyadi in #6153
- feat(graphql): partial pagination for page based pagination by @xavierleune in #6120
- feat: improve ApiProperty::security using property name by @vincentchalamon in #5853
- feat(symfony): add
getOperation
Expression Language function on Mercure topics by @vincentchalamon in #5854 - feat(openapi): disable response override by @soyuka in #6221
- feat(openapi): add webhook - openapi by @alli83 in #5873
- feat(metadata): allow \Stringable for security parameters by @aurimasrim in #6095
- feat(hydra): read hydra:property from ApiProperty::jsonLdContext by @soyuka in #6240
- feat(jsonschema): JSON:API schema factory by @GwendolenLynch in #6250
- feat(serializer): update MissingConstructorArgumentsException message by @ERuban in #5902
- feat(metadata): Parameter implementation by @soyuka in #6246
- feat(serializer): attribute Parameter by @soyuka in #6247
- feat(doctrine): parameter filter extension by @soyuka in #6248
Notes
You can remove the event_listeners_backward_compatibility_layer
flag and set use_symfony_listeners
instead.
If you use controllers you should use:
api_platform:
use_symfony_listeners: true
The use_symfony_listeners
should be true
if you use controllers or if you rely on Symfony event listeners.
Note that now flags like read
can be forced to true
if you want to call a Provider even on POST
operations. These are the rules we set up on runtime if no value has been set:
if (null === $operation->canValidate()) {
$operation = $operation->withValidate(!$request->isMethodSafe() && !$request->isMethod('DELETE'));
}
if (null === $operation->canRead()) {
$operation = $operation->withRead($operation->getUriVariables() || $request->isMethodSafe());
}
if (null === $operation->canDeserialize()) {
$operation = $operation->withDeserialize(\in_array($operation->getMethod(), ['POST', 'PUT', 'PATCH'], true));
}
Previously listeners did the checks before reading our flags and you could not force the values. You can now force an operation state, for example:
<?php
#[Delete(validate: true)]
#[Post(read: true)]
class Book {}
A new interface ApiPlatform\Serializer\TagCollectorInterface
allows to collect cache tags (IRIs) during serialization instead of using API Platform defaults.
An experimental feature (#5290) gives the ability to use security
on sub resource links.
These namespaces are deprecated:
ApiPlatform\Api
ApiPlatform\Exception
ApiPlatform\Problem
ApiPlatform\Action
ApiPlatform\Util
Most of the classes have moved to ApiPlatform\Metadata
.
Full Changelog: v3.2.22...v3.3.0