3

I was trying to install FOSRestBundle on Symfony 5 using composer but got the following error message:

friendsofsymfony/rest-bundle 2.7.1 requires symfony/config ^3.4|^4.3

Is it possible to manually install FOSRestBundle with Symfony 5; as it seems it will not be updated and instead API Platform will be maintained in future?

I don't want to use API Platform as it has lot of stuff not required by my project.

yivi
  • 42,438
  • 18
  • 116
  • 138
MyO
  • 413
  • 1
  • 8
  • 19
  • 1
    If that bundle is not updated to Symfony 5 yet then you could either wait for them to update it. Or you could create a fork of the bundle and update it to be SF5 ready yourself. Other than that there really aren't any good options I'm afraid. – Dirk Scholten Mar 04 '20 at 10:13
  • 1
    An [issue](https://github.com/FriendsOfSymfony/FOSRestBundle/issues/2043#issuecomment-582550337) is already open to support SF5. – GrenierJ Mar 04 '20 at 10:23
  • 1
    Which part of that error message are unclear? If the bundle is not yet compatible, have you tried to check with them about it? – Nico Haase Mar 04 '20 at 11:17

2 Answers2

4

FOSRestBundle development has not been abandoned.

But Symfony 5 support is not expected until version 3.

You can check the progress here. As you can see there is no due date yet.

So you either continue using FOSRestBundle with Symfony 4.4 (which is perfectly acceptable, 4.4 it's a long term release and it's not going anywhere), or you need Symfony 5; you either look for alternatives to FOSRestBundle or run a pre-release version (with the risks that it entail).

yivi
  • 42,438
  • 18
  • 116
  • 138
  • 1
    [Version 3](https://github.com/FriendsOfSymfony/FOSRestBundle/issues/2043#issuecomment-638976888) is available now. – auipga Jun 10 '20 at 12:45
1

Thanks GrenierJ, an issue is already open and as per xabbuh, the master now serves for the development of FOSRestBundle 3.0. Its version constraints already allow Symfony 5 components. I tried to install the dev-master using composer require --dev friendsofsymfony/rest-bundle:dev-master and it successfully installed. Its under development so all of its features may not be compatible with Symfony 5.

MyO
  • 413
  • 1
  • 8
  • 19