github api-platform/core v3.3.2

latest releases: v4.0.1, v4.0.0, v3.4.0...
4 months ago

What's Changed

  • fix(symfony): define use_symfony_listeners by @soyuka in #6344
  • fix(symfony): set normalization context in request attributes by @soyuka in #6345
  • fix(state): read without output by @soyuka in #6347
  • docs: add guide for custom TagCollector service by @usu in #6348
  • fix(symfony): use_symfony_listeners before registering services by @soyuka in #6350

Notes

You can remove the event_listeners_backward_compatibility_layer flag and set use_symfony_listeners instead. 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.

Full Changelog: v3.3.0...v3.3.1

Full Changelog: v3.3.0...v3.3.2

Don't miss a new core release

NewReleases is sending notifications on new releases.