Core: Not supported Method in Symfony 2.8.*

Created on 11 Apr 2017  路  12Comments  路  Source: api-platform/core

Request haven't a method getMimeTypes in Symfony 2.8.*
/api-platform/core/src/EventListener/AddFormatListener.php

61: $mimeTypes = Request::getMimeTypes($routeFormat);

Not supported !
Please use for Symfony 2.8.* :
$mimeTypes = [$request->getMimeType($routeFormat)];

wontfix

Most helpful comment

API Platform 2.0 requires Symfony v3.2, doesn't support 2.8

All 12 comments

API Platform 2.0 requires Symfony v3.2, doesn't support 2.8

  • Improve compatibility with Symfony 2.8

Version 2.0.3

The "Improve compatibility with Symfony 2.8" that version did was only to use PHP constants instead of JsonResponse constant.
Anyway, I don't know the reason to support 2.8 in the core, and not in the API Platform framework

@magarzon maybe i create PR and You look it up? Simply, all other functions of Api-platform work perfect in 2.8. 2.8 is LTS support version

@fedotovaleksandr If you could create a PR and we will look that.

We could not fix this since we need this methods.

I think you should use version 3.1 of HttpFoundation in order to make this work.

@Simperfit I just installed the new beta and it does not work with 2.8 because of a few things in the ApiPlatformExtension and some service definitions. As far as I can see from the composer file the beta still supports symfony 2.8 - is this still valid or do we have to stick with 2.0 when running 2.8 ? Pull requests welcome for 2.8 maintenance?

p.s. I'm using HttpFoundation 3.1 and Serializer 3.1

You need a newer version for many of the Symfony components. At that point, staying with 2.8 starts to look like a losing proposition. :smile:

Well but 2.8 is the only LTS Version currently, shouldn't it be possible to use a LTS Version with api-platform? 3.4 LTS won't be out until next year and our plans were to use 2.8 until the next LTS comes out.

You can stick to API Platform 2.0 :)

Ok will do, thanks for clearing that out ;)

Was this page helpful?
0 / 5 - 0 ratings