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

Move ThemeServiceProvider and AddonServiceProvider to CRUD #5147

Open
tabacitu opened this issue Jun 29, 2023 · 1 comment
Open

Move ThemeServiceProvider and AddonServiceProvider to CRUD #5147

tabacitu opened this issue Jun 29, 2023 · 1 comment

Comments

@tabacitu
Copy link
Member

Right now all our addons have their own service providers, which extend an AutomaticServiceProvider that lives in each.freaking.package. While that has worked ok so far, because we were unsure whether we want to make changes to them (and we did), we haven't needed to make changes to them in a while. That means they're stable. Different... but stable.

So what I propose we do is create two ServiceProvider classes in CRUD, to hold the logic that is now in the AutomaticServiceProvider:

  • ThemeServiceProvider
  • AddonServiceProvider

Then each package's provider can just extend it.

Notes:

  • not all AutomaticServiceProvider classes are identical; we have to spot the differences before we delete them from their respective packages; and make one provider that caters to all (or override just that one bit they need);
  • ThemeServiceProvider and AddonServiceProvider are very similar; so they should share a lot of stuff using traits, or perhaps one extending the other;
@tabacitu
Copy link
Member Author

Note: I've already done this for ThemeServiceProvider, because it wasn't very difficult, we had only 3 packages using it (ours) and they were identical.

Next up: Doing the same for AddonServiceProvider. But that'll take a lot more time because there ARE small but important differences between them in our packages. Postponing until we get more room to breathe.

@tabacitu tabacitu moved this from Reviewed, Needs Changes to Todo in Backpack v6.x (July 2023-Feb 2024) Jun 29, 2023
@tabacitu tabacitu moved this from Needs Testing, Review or Docs to Todo in This week Jun 29, 2023
@tabacitu tabacitu added Size: M 1 week and removed Priority: MUST labels Jun 29, 2023
@tabacitu tabacitu removed this from This week Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants