Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "friendsofsymfony/rest-bundle:^3.0" #1185

Merged
merged 1 commit into from
Jun 26, 2020

Conversation

phansys
Copy link
Member

@phansys phansys commented Jun 22, 2020

Subject

Allow "friendsofsymfony/rest-bundle:^3.0".

I am targeting this branch, because these changes respect BC.

Changelog

### Added
- Added support for "friendsofsymfony/rest-bundle:^3.0";
- Added public alias `Sonata\UserBundle\Controller\Api\UserController` for `sonata.user.controller.api.user` service;
- Added public alias `Sonata\UserBundle\Controller\Api\GroupController` for `sonata.user.controller.api.group` service.
### Removed
- Removed support for symfony/*:<4.4;
- Removed support for deprecated "rest" routing type.

Sonata\UserBundle\Controller\Api\GroupController

To do

  • Update the tests;
  • Update the docs;
  • Update the routing in order to use other route type than "rest".

@phansys phansys added the minor label Jun 22, 2020
@phansys phansys force-pushed the fos_rest branch 7 times, most recently from 137fb12 to 7948db2 Compare June 24, 2020 09:47
@phansys phansys requested a review from a team June 24, 2020 09:56
@phansys
Copy link
Member Author

phansys commented Jun 24, 2020

I'd like to check the former API routing implementation, but I couldn't because the XSD schema validation for the "rest" routing type is not working:

[ERROR 1845] Element '{http://friendsofsymfony.github.com/schema/rest}routes': No matching global declaration available for the validation root.

@phansys phansys marked this pull request as ready for review June 24, 2020 10:11
@wbloszyk
Copy link
Member

@phansys This RP will fix API working for each sonata bundles in sandbox. Mybe we can add support for NelmioApiDocBundle ^3.0 or even ^4.0? Current 2.x is not maintained anymore. It must be upgrade to allow support Symfony5 to dev. Can you create dev-kit issue with TODO list?

BTW, I can help with it. Just give me example ir tell what to do.

@phansys
Copy link
Member Author

phansys commented Jun 24, 2020

@phansys This RP will fix API working for each sonata bundles in sandbox. Maybe we can add support for NelmioApiDocBundle ^3.0 or even ^4.0? Current 2.x is not maintained anymore. It must be upgrade to allow support Symfony5 to dev. Can you create dev-kit issue with TODO list?

Sure @wbloszyk, Thank you!
Nevertheless, I'd prefer to merge this PR first, since it is blocking third party projects to use "friendsofsymfony/rest-bundle:^3.0", while that's not the case with "nelmio/api-doc-bundle".
I'll try to add support for version "nelmio/api-doc-bundle:^3.0" in other PR.
IMO, support for version 4 must wait because it's using OAS 3.0, so that will be a BC break.
Based on how easy can be that change, I'll open a TODO list at dev-kit if I need help.
Do you agree?

@wbloszyk
Copy link
Member

You can also create simmilar to my issue: sonata-project/dev-kit#697

  • Step 1 - add support for friendsofsymfony/rest-bundle
  • Step 2 - add suport for nelmio/api-doc-bundle
    ...

This will show for everyone about this feature and how far you are.

@greg0ire greg0ire merged commit 73b7f91 into sonata-project:4.x Jun 26, 2020
@greg0ire
Copy link
Contributor

Thanks @phansys !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants