Skip to content

Releases: jungi-php/framework-extra-bundle

v2.1.0

07 Dec 20:21
v2.1.0
Compare
Choose a tag to compare

Changed

  • Adapted new ValueResolverInterface (6.2) in all value argument resolvers

v2.0.0

12 Mar 20:31
v2.0.0
Compare
Choose a tag to compare

Added

  • EntityResponse - an HTTP response with an entity that is mapped to the selected content type using the content negotiation.

Changed

  • Transition to PHP v8.0
  • Transition to Symfony v6.0
  • ConverterManager no longer checks whether the passed value is already of the given type. Now, each converter should take care of this itself.
  • SerializerObjectConverterAdapter to SerializerConverterAdapter. It no longer checks if the type is an object type, it fully delegates to the adapted denormalizer.

Removed

  • Annotations
  • Conversion of array|object types by BuiltinTypeSafeConverter.
  • Deprecated configuration option entity_response.default_content_type.
  • Attribute ResponseBody, use EntityResponse instead.

v1.4.2

03 Jan 18:10
v1.4.2
Compare
Choose a tag to compare

Fixed

  • Deprecations of missing return type declarations.

v1.4.1

22 Sep 16:42
v1.4.1
Compare
Choose a tag to compare

Fixed

  • Deprecated PHP 8.1 "null" on the 2nd argument of the InvalidArgumentException in DefaultObjectExporter.

v1.4.0

29 Aug 17:37
v1.4.0
Compare
Choose a tag to compare

Changed

  • Attributes are taken either directly from the ArgumentMetadata or from the attribute locator.
  • Annotations (not attributes) will be only taken into account when the doctrine\annotations package is available (in no-dev mode).

Deprecated

  • onAttribute() and onAnnotation() methods on RequestBodyValueResolver, use the constructor instead
  • onAttribute() and onAnnotation() methods on RequestCookieValueResolver, use the constructor instead
  • onAttribute() and onAnnotation() methods on RequestHeaderValueResolver, use the constructor instead
  • onAttribute() and onAnnotation() methods on RequestParamValueResolver, use the constructor instead
  • onAttribute() and onAnnotation() methods on QueryParamValueResolver, use the constructor instead
  • onAttribute() and onAnnotation() methods on QueryParamsValueResolver, use the constructor instead

Removed

  • Support for Symfony lower than v5.3

v1.3.0

31 Jul 15:27
v1.3.0
Compare
Choose a tag to compare

Added

  • Added support of nullable RequestBody arguments. When a request body is empty, and the content type is unavailable, a default argument value is used, or null in case of a nullable argument.

Changed

  • No error for nullable RequestBody arguments.

Removed

  • Doctrine annotations from the composer dependencies.
  • Support for Symfony v4.4

v1.2.0

27 Sep 11:58
v1.2.0
Compare
Choose a tag to compare

Added

  • Attributes (PHP 8.0).

Changed

  • Refreshed the named value argument value resolvers. Simplified the getArgumentValue method signature by using the new NamedValueArgument.
  • Attributes are now key part of the bundle, annotations are used as adapters for attributes and are intended for projects basing on <= PHP 7.4.
  • Updated all argument value resolvers to support both annotations and attributes.
  • Changed internal Jungi\FrameworkExtraBundle\Annotation\AbstractAnnotation to StatefulTrait.

Removed

  • internal Jungi\FrameworkExtraBundle\Annotation\NamedValueArgument.

Fixed

  • Detecting duplicated annotations on argument by RegisterControllerAnnotationLocatorsPass.
  • Deprecation of ReflectionParameter::isArray() in RegisterControllerAnnotationLocatorsPass.

v1.1.0

11 Sep 14:56
v1.1.0
Compare
Choose a tag to compare

Added

  • Use the default content type application/json (can be overwritten in the configuration) when the request Content-Type is unavailable in the RequestBodyValueResolver.
  • Information about no registered message body mappers when creating an entity response.

Changed

  • Moved validation of @RequestBody argument type from RequestBodyValueResolver to RegisterControllerAnnotationLocatorsPass.
  • Extended ability of mapping data to any type in MapperInterface.
  • Use mappers instead of converters on non-object types (scalars, collections) in the RequestBodyValueResolver.
  • Instead of 406 HTTP response, return 500 HTTP response in case of no registered message body mapper.

Fixed

  • Handle exception on mapping to an array when scalar data has been provided in SerializerMapperAdapter.
  • Typo in the message of not acceptable http exception.

Deprecated

  • Config option "default_content_type" at "entity_response". Moved to the root node "jungi_framework_extra".