Skip to content

Releases: FriendsOfSymfony/FOSRestBundle

2.8.0-beta1

07 May 19:26
2.8.0-beta1

Choose a tag to compare

2.8.0-beta1 Pre-release
Pre-release

Features

  • added a SerializerErrorHandler that leverages the FOS\RestBundle\Serializer\Serializer interface
    to hook into the error rendering process provided by the ErrorHandler component since Symfony 4.4

  • added a new normalizer (for the Symfony serializer) and a new handler (for the JMS serializer) to
    serialize FlattenException instances, for backwards compatibility the resulting format by default
    is the same as was used for exceptions/errors before, use the flatten_exception_format to opt-in
    to a format compatible with the API Problem spec (RFC 7807):

    fos_rest:
        exception:
            flatten_exception_format: 'rfc7807'
  • added a new ResponseStatusCodeListener that maps exception/error codes to response status codes,
    enable it by setting the new map_exception_codes option to true

Deprecations

  • the route generation feature is deprecated, disable it explicitly:

    fos_rest:
        routing_loader: false

    You need to configure your routes explicitly or consider using the
    RestRoutingBundle.

  • deprecated support for serializing exceptions, disable it by setting the serialize_exceptions
    option to false:

    fos_rest:
        exception:
            serialize_exceptions: false
  • deprecated returning anything other than string or null from resolve() when implementing the VersionResolverInterface.

  • deprecated support for passing version numbers as integers to Context::setVersion() (strings
    will be enforced as of 3.0)

  • deprecated the isFormatTemplating(), renderTemplate(), and prepareTemplateParameters()
    methods of the ViewHandler class and the ViewHandlerInterface

  • deprecated the constructor of the ViewHandler class, use the static create() factory method
    instead

  • deprecated the setTemplateVar(), setPopulateDefaultVars(), getTemplateVar(), and
    isPopulateDefaultVars() methods of the Controller\Annotations\View class

  • deprecated the setEngine(), setTemplate(), setTemplateData(), setTemplateVar(), getEngine(),
    getTemplate(), getTemplateData(), and getTemplateVar() methods of the View\View class

  • deprecated not setting the fos_rest.service.templating and fos_rest.view.default_engine options

  • deprecated not setting the fos_rest.view.force_redirects option to the empty array

  • deprecated the following options:

    • fos_rest.exception.exception_controller
    • fos_rest.exception.exception_listener
    • fos_rest.exception.service
    • fos_rest.view.templating_formats
  • the following classes are marked as deprecated, they will be removed in 3.0:

    • FOS\RestBundle\Controller\Annotations\NamePrefix
    • FOS\RestBundle\Controller\Annotations\NoRoute
    • FOS\RestBundle\Controller\Annotations\Prefix
    • FOS\RestBundle\Controller\Annotations\RouteResource
    • FOS\RestBundle\Controller\Annotations\Version
    • FOS\RestBundle\Controller\ExceptionController
    • FOS\RestBundle\Controller\TemplatingExceptionController
    • FOS\RestBundle\Controller\TwigExceptionController
    • FOS\RestBundle\EventListener\ExceptionListener
    • FOS\RestBundle\Routing\Loader\DirectoryRouteLoader
    • FOS\RestBundle\Routing\Loader\Reader\RestActionReader
    • FOS\RestBundle\Routing\Loader\Reader\RestControllerReader
    • FOS\RestBundle\Routing\Loader\RestRouteLoader
    • FOS\RestBundle\Routing\Loader\RestRouteProcessor
    • FOS\RestBundle\Routing\Loader\RestXmlCollectionLoader
    • FOS\RestBundle\Routing\Loader\RestYamlCollectionLoader
    • FOS\RestBundle\Routing\ClassResourceInterface
    • FOS\RestBundle\Routing\RestRouteCollection
    • FOS\RestBundle\Serializer\Normalizer\ExceptionHandler
    • FOS\RestBundle\Serializer\Normalizer\ExceptionNormalizer
  • the following services and aliases are marked as deprecated, they will be removed in 3.0:

    • fos_rest.exception_listener
    • fos_rest.exception.controller
    • fos_rest.exception.twig_controller
    • fos_rest.routing.loader.controller
    • fos_rest.routing.loader.directory
    • fos_rest.routing.loader.processor
    • fos_rest.routing.loader.reader.controller
    • fos_rest.routing.loader.reader.action
    • fos_rest.routing.loader.xml_collection
    • fos_rest.routing.loader.yaml_collection
    • fos_rest.serializer.exception_normalizer.jms
    • fos_rest.serializer.exception_normalizer.symfony
    • fos_rest.templating
  • the following classes are marked as internal (backwards compatibility will no longer be guaranteed
    starting with FOSRestBundle 3.0):

    • FOS\RestBundle\DependencyInjection\Compiler\HandlerRegistryDecorationPass
    • FOS\RestBundle\DependencyInjection\FOSRestExtension
    • FOS\RestBundle\Form\Extension\DisableCSRFExtension
    • FOS\RestBundle\Form\Transformer\EntityToIdObjectTransformer
    • FOS\RestBundle\Normalizer\CamelKeysNormalizer
    • FOS\RestBundle\Normalizer\CamelKeysNormalizerWithLeadingUnderscore
    • FOS\RestBundle\Serializer\Normalizer\FormErrorHandler
    • FOS\RestBundle\Serializer\Normalizer\FormErrorNormalizer
    • FOS\RestBundle\Util\ExceptionValueMap
  • the following classes are marked as final (extending them will not be supported as of 3.0):

    • FOS\RestBundle\Decoder\ContainerDecoderProvider
    • FOS\RestBundle\Decoder\JsonDecoder
    • FOS\RestBundle\Decoder\JsonToFormDecoder
    • FOS\RestBundle\Decoder\XmlDecoder
    • FOS\RestBundle\Form\Transformer\EntityToIdObjectTransformer
    • FOS\RestBundle\Inflector\DoctrineInflector
    • FOS\RestBundle\Negotiation\FormatNegotiator
    • FOS\RestBundle\Request\ParamFetcher
    • FOS\RestBundle\Request\ParamReader
    • FOS\RestBundle\Request\RequestBodyParamConverter
    • FOS\RestBundle\Response\AllowMethodsLoader\AllowedMethodsRouterLoader
    • FOS\RestBundle\Serializer\JMSSerializerAdapter
    • FOS\RestBundle\Serializer\SymfonySerializerAdapter
    • FOS\RestBundle\Version\ChainVersionResolver
    • FOS\RestBundle\Version\Resolver\HeaderVersionResolver
    • FOS\RestBundle\Version\Resolver\MediaTypeVersionResolver
    • FOS\RestBundle\Version\Resolver\QueryParameterVersionResolver
    • FOS\RestBundle\View\JsonpHandler
    • FOS\RestBundle\View\View
    • FOS\RestBundle\View\ViewHandler

2.7.4

23 Apr 17:35
2.7.4

Choose a tag to compare

  • fixed compatibility with JMS Serializer with explicitly disabled max
    depth checks (#2060)
  • fixed config validation when mapping Throwable instances of classes
    that do not extend PHP's Exception class (#2131)

2.7.3

28 Mar 08:25
2.7.3

Choose a tag to compare

  • harden the JsonToFormDecoder to not error on non-array input (#2145)

2.7.2

04 Mar 21:20
2.7.2

Choose a tag to compare

  • fixed serializing Error instances when the Symfony Serializer is used (#2110)
  • fixed serializing Error instances when JMS Serializer is used (#2105)
  • fixed compatibility with null owner returned by SensioFrameworkExtraBundle (#2097)
  • completely fixed handling Throwable objects in ExceptionController::showAction(), continues #2093 (#2096)

2.7.1

24 Feb 09:05
2.7.1

Choose a tag to compare

  • fixed handling all Throwable objects in ExceptionController::showAction() (#2093)
  • fixed ViewHandlerInterface alias definition (#2085)

2.7.0

31 Jan 16:13
2.7.0

Choose a tag to compare

  • ignore SessionInterface and UserInterface controller action arguments
  • fixed ExceptionListener deprecation warning
  • fixed ControllerNameParser deprecation warning
  • fixed DisableCSRFExtension::getExtendedTypes() return type
  • improved EngineInterface error message in ViewHandler
  • improved Symfony 4.4 compatibility
  • automatically use Twig as templating engine when available

2.6.0

21 Oct 08:23
2.6.0

Choose a tag to compare

  • ensure compatibility with the FlattenException from the new ErrorRenderer component
  • fix handling the serialize_null option with the Symfony serializer
  • added support for using multiple constraints for the requirements option of the @RequestParam
    annotation
  • drop support for PHP 5.5, 5.6 and 7.0
  • drop support for SF 4.0, 4.1 and 4.2 (3.4 LTS is still supported)
  • deprecated using the ParamFetcher class without passing a validator as the third argument, this
    argument will become mandatory in 3.0
  • fix compatiblity without the deprecated templating in Symfony 4.3; see #2012 on how to configure the FOSRestBundle
  • removed symfony/templating from the dependencies; if you still use it you need to require it in your app

2.5.0

03 Jan 17:47
2.5.0

Choose a tag to compare

  • compatibility with Symfony 4.2
  • deprecated the FOSRestController base class, use the new AbstractFOSRestController instead
  • dropped support for Symfony 2.7 to 3.3
  • compatibility with JMS Serializer 2 and JMSSerializerBundle 3
  • overwrite rules when they are defined in different config files instead of throwing exceptions
  • fixed using the nullable option of the param annotations when the map option is enabled
  • ensure a predictable order of routes by sorting controllers by name when loading classes from a directory
  • reset the internal state of the view handler to fix compatibility with PHP-PM
  • fix different bugs related to the handling of API versions (see #1491, #1529, #1691)

2.4.0: fix route generator not ignoring body param converters (#1934)

23 Aug 09:07

Choose a tag to compare

[BC break] @Route::$service is no longer supported, see the changelog and #1822.

This release primarily fixes deprecations.

2.3.1

02 Mar 18:05
2.3.1

Choose a tag to compare

  • improved Symfony 4 compatibility

  • manually decorate the core JMS handler registry

  • run checks after SensioFrameworkExtraBundle

  • made the view handler alias public

  • check for definitions before they might be removed

  • added Yaml routing resource support

  • refactored several unit tests