has('http_middleware.negotiation') && is_a($container->getDefinition('http_middleware.negotiation')->getClass(), NegotiationMiddleware::class, TRUE)) { // @see http://www.iana.org/assignments/media-types/application/vnd.api+json $container->getDefinition('http_middleware.negotiation') ->addMethodCall('registerFormat', [ 'api_json', ['application/vnd.api+json'], ]); } } /** * {@inheritdoc} */ public function register(ContainerBuilder $container) { $container->addCompilerPass(new RegisterSerializationClassesCompilerPass()); } }