2.8.0-beta1
Pre-releaseFeatures
-
added a
SerializerErrorHandlerthat leverages theFOS\RestBundle\Serializer\Serializerinterface
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
serializeFlattenExceptioninstances, for backwards compatibility the resulting format by default
is the same as was used for exceptions/errors before, use theflatten_exception_formatto opt-in
to a format compatible with the API Problem spec (RFC 7807):fos_rest: exception: flatten_exception_format: 'rfc7807'
-
added a new
ResponseStatusCodeListenerthat maps exception/error codes to response status codes,
enable it by setting the newmap_exception_codesoption totrue
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
stringornullfromresolve()when implementing theVersionResolverInterface. -
deprecated support for passing version numbers as integers to
Context::setVersion()(strings
will be enforced as of 3.0) -
deprecated the
isFormatTemplating(),renderTemplate(), andprepareTemplateParameters()
methods of theViewHandlerclass and theViewHandlerInterface -
deprecated the constructor of the
ViewHandlerclass, use the staticcreate()factory method
instead -
deprecated the
setTemplateVar(),setPopulateDefaultVars(),getTemplateVar(), and
isPopulateDefaultVars()methods of theController\Annotations\Viewclass -
deprecated the
setEngine(),setTemplate(),setTemplateData(),setTemplateVar(),getEngine(),
getTemplate(),getTemplateData(), andgetTemplateVar()methods of theView\Viewclass -
deprecated not setting the
fos_rest.service.templatingandfos_rest.view.default_engineoptions -
deprecated not setting the
fos_rest.view.force_redirectsoption to the empty array -
deprecated the following options:
fos_rest.exception.exception_controllerfos_rest.exception.exception_listenerfos_rest.exception.servicefos_rest.view.templating_formats
-
the following classes are marked as
deprecated, they will be removed in 3.0:FOS\RestBundle\Controller\Annotations\NamePrefixFOS\RestBundle\Controller\Annotations\NoRouteFOS\RestBundle\Controller\Annotations\PrefixFOS\RestBundle\Controller\Annotations\RouteResourceFOS\RestBundle\Controller\Annotations\VersionFOS\RestBundle\Controller\ExceptionControllerFOS\RestBundle\Controller\TemplatingExceptionControllerFOS\RestBundle\Controller\TwigExceptionControllerFOS\RestBundle\EventListener\ExceptionListenerFOS\RestBundle\Routing\Loader\DirectoryRouteLoaderFOS\RestBundle\Routing\Loader\Reader\RestActionReaderFOS\RestBundle\Routing\Loader\Reader\RestControllerReaderFOS\RestBundle\Routing\Loader\RestRouteLoaderFOS\RestBundle\Routing\Loader\RestRouteProcessorFOS\RestBundle\Routing\Loader\RestXmlCollectionLoaderFOS\RestBundle\Routing\Loader\RestYamlCollectionLoaderFOS\RestBundle\Routing\ClassResourceInterfaceFOS\RestBundle\Routing\RestRouteCollectionFOS\RestBundle\Serializer\Normalizer\ExceptionHandlerFOS\RestBundle\Serializer\Normalizer\ExceptionNormalizer
-
the following services and aliases are marked as
deprecated, they will be removed in 3.0:fos_rest.exception_listenerfos_rest.exception.controllerfos_rest.exception.twig_controllerfos_rest.routing.loader.controllerfos_rest.routing.loader.directoryfos_rest.routing.loader.processorfos_rest.routing.loader.reader.controllerfos_rest.routing.loader.reader.actionfos_rest.routing.loader.xml_collectionfos_rest.routing.loader.yaml_collectionfos_rest.serializer.exception_normalizer.jmsfos_rest.serializer.exception_normalizer.symfonyfos_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\HandlerRegistryDecorationPassFOS\RestBundle\DependencyInjection\FOSRestExtensionFOS\RestBundle\Form\Extension\DisableCSRFExtensionFOS\RestBundle\Form\Transformer\EntityToIdObjectTransformerFOS\RestBundle\Normalizer\CamelKeysNormalizerFOS\RestBundle\Normalizer\CamelKeysNormalizerWithLeadingUnderscoreFOS\RestBundle\Serializer\Normalizer\FormErrorHandlerFOS\RestBundle\Serializer\Normalizer\FormErrorNormalizerFOS\RestBundle\Util\ExceptionValueMap
-
the following classes are marked as
final(extending them will not be supported as of 3.0):FOS\RestBundle\Decoder\ContainerDecoderProviderFOS\RestBundle\Decoder\JsonDecoderFOS\RestBundle\Decoder\JsonToFormDecoderFOS\RestBundle\Decoder\XmlDecoderFOS\RestBundle\Form\Transformer\EntityToIdObjectTransformerFOS\RestBundle\Inflector\DoctrineInflectorFOS\RestBundle\Negotiation\FormatNegotiatorFOS\RestBundle\Request\ParamFetcherFOS\RestBundle\Request\ParamReaderFOS\RestBundle\Request\RequestBodyParamConverterFOS\RestBundle\Response\AllowMethodsLoader\AllowedMethodsRouterLoaderFOS\RestBundle\Serializer\JMSSerializerAdapterFOS\RestBundle\Serializer\SymfonySerializerAdapterFOS\RestBundle\Version\ChainVersionResolverFOS\RestBundle\Version\Resolver\HeaderVersionResolverFOS\RestBundle\Version\Resolver\MediaTypeVersionResolverFOS\RestBundle\Version\Resolver\QueryParameterVersionResolverFOS\RestBundle\View\JsonpHandlerFOS\RestBundle\View\ViewFOS\RestBundle\View\ViewHandler