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

DEPRECATE REST APIs #1465

Closed
10 tasks done
wbloszyk opened this issue Mar 12, 2021 · 16 comments
Closed
10 tasks done

DEPRECATE REST APIs #1465

wbloszyk opened this issue Mar 12, 2021 · 16 comments
Labels

Comments

@wbloszyk
Copy link
Member

wbloszyk commented Mar 12, 2021

Now we have a lot of problems with keeps APIs like:

  • can not add support for symfony/config 5.x becouse nelmio/api-doc-bundle 2.x have config bug
  • can not use nelmio/api-doc-bundle 4.x becouse it is in conflict
  • nelmio/api-doc-bundle 2.x have not support symfony 5
  • not all sonata bundles support nelmio 3.x

My solution is move APIs to seperate bundle or bundles. This will move all dependencies require to REST API to seperate bundle and allow us ignire it in 4.0 milestones.

For example:

  • SonataMediaBundle will provide abstractMediaApiController
  • In API bundle it will be extended with annotation for specify nelmio version
  • 1.x - nelmio 2
  • 2.x nelmio 3
  • 3.x nelmio 4
  • 4.x api platform
  • or we can use only one version

IMO we should do it in one bundle sonata-project/api-bundle.

WDYT? @sonata-project/contributors

TODO:

Deprecate REST API in stable branch:

Remove REST API in unstable branch:

Bundles that we will not be deprecating the api (abandoned)

  • ecomerce
  • SonataNotificationBundle
@wbloszyk wbloszyk changed the title [RFC] Move API TO SEPER [RFC] Move APIs to seperate bundle Mar 12, 2021
@wbloszyk wbloszyk added the RFC label Mar 12, 2021
@core23
Copy link
Member

core23 commented Mar 12, 2021

Which APIs do you mean? REST?

@wbloszyk wbloszyk changed the title [RFC] Move APIs to seperate bundle [RFC] Move REST APIs to seperate bundle Mar 12, 2021
@core23
Copy link
Member

core23 commented Mar 12, 2021

My solution is move APIs to seperate bundle or bundles. This will move all dependencies require to REST API to seperate bundle and allow us ignire it in 4.0 milestones.

👍

IMO we should do it in one bundle sonata-project/api-bundle.

👎 This will bring other problems. If you just require api-bundle, it would install ALL bundles with an api or you will get some strange require-dev / conflict entries.

Might relate to this issue: #537

@wbloszyk
Copy link
Member Author

IMO we should do it in one bundle sonata-project/api-bundle.

👎 This will bring other problems. If you just require api-bundle, it would install ALL bundles with an api or you will get some strange require-dev / conflict entries.

api-bundle will be in sugesstion section for each bundle where it is possible to use with conflict to set minimum api-bundle version.
in api-bundle we should add only conflict with minimum version. Require-dev can be ingore. Test can be provide by GitHub actions.

Might relate to this issue: #537

Simmilar but here dependencies are diffrence third part bundles. in admin dependencies are one ower bundle.

@VincentLanglet
Copy link
Member

With @jordisala1991, we're currently discussing a lot about the Media bundle which has Rest API, and the issue with the duplicate code in datagridBundle and adminBundle.

In the media bundle

If we split this, we have to

It requires some work but would be a nice way to stop using datagridBundle in our admin-related bundles.

@VincentLanglet
Copy link
Member

VincentLanglet commented Sep 18, 2021

The new strategy is to deprecate the REST API sonata-project/SonataMediaBundle@e985c2c

We should list them all

@wbloszyk
Copy link
Member Author

Updated.

@VincentLanglet VincentLanglet changed the title [RFC] Move REST APIs to seperate bundle DEPRECATE REST APIs Sep 20, 2021
@jordisala1991
Copy link
Member

I remove ecommerce an NewsBundle, since they are abandoned and will not get major releases.

@VincentLanglet
Copy link
Member

Deprecating/Removing the REST Api will allow to remove the datagrid-bundle dependency for the next majors.
We will be able to abandon it then as proposed in #1669

@VincentLanglet
Copy link
Member

SonataNotification and SonataUser is not yet abandoned, so we should still deprecate the rest API

@wbloszyk
Copy link
Member Author

wbloszyk commented Oct 3, 2021

SonataNotification and SonataUser is not yet abandoned, so we should still deprecate the rest API

We font wanna release these bundles in Sonata 4, so it is no reason to deprecate ReST API for them. They will be deprecated as whole bundle.

@VincentLanglet
Copy link
Member

SonataNotification and SonataUser is not yet abandoned, so we should still deprecate the rest API

We dont wanna release these bundles in Sonata 4, so it is no reason to deprecate ReST API for them. They will be deprecated as whole bundle.

SonataNotification is not related to SonataAdmin, and a major could be created if needed if it helps people to migrate, dunno.
And the futur of SonataUser is not clear. So I cannot say there won't be any major first.
SonataNews was abandoned, and yet, there is still some PR on it.

Maybe they will be deprecated/abandoned, but currently there are not.

@core23 core23 mentioned this issue Oct 10, 2021
46 tasks
@VincentLanglet
Copy link
Member

As far, UserBundle and Notification are not abandoned so we should still deprecate the rest API.
This will allow us to deprecate the DatagridBundle.

@VincentLanglet
Copy link
Member

And as mention in #1714 (comment)

We should deprecate the API-Rest, all the method getPager and all the PageableManager extension.

@jordisala1991
Copy link
Member

jordisala1991 commented Dec 5, 2021

Do you think it is needed to deprecate NotificationBundle API? It will be deprecated when pagerbundle drops its usage (and it is required for next major)

Otherwise we can close this issue, the rest of the api are deprecated and removed.

@VincentLanglet
Copy link
Member

Let's close it then.

@VincentLanglet
Copy link
Member

There is sonata-project/SonataPageBundle#1238 to remove NotificationBundle from PageBundle

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

No branches or pull requests

4 participants