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

Mark ServiceManager as final and change AbstractPluginManager to use composition over inheritance #174

Closed
boesing opened this issue Feb 13, 2023 · 2 comments · Fixed by #179
Labels
Milestone

Comments

@boesing
Copy link
Member

boesing commented Feb 13, 2023

RFC

Q A
Proposed Version(s) 4.0.0
BC Break? Yes

Goal

Remove inheritance of ServiceManager.

Background

Besides the fact that composition over inheritance should be preferred, the AbstractPluginManager is overriding methods from ServiceManager which should be delegated instead.

Considerations

Upstream projects might type against PluginManagerInterface or the specific plugin manager instance instead of typing against ServiceManager and thus the BC break would be not too big.

Proposal(s)

  • create clean ServiceManager instance within __construct and configure that service manager with the config for the plugin manager.
  • remove ServiceManager specific public methods
  • only support get, has, build as declared within PluginManagerInterface
  • create ConfigurableInterface which provides configure method to consume ServiceManagerConfigurationType which passes the argument to the pluginmanager related ServiceManager
  • make PluginManagerInterface implement ConfigurableInterface so that all plugin managers have to implement that interface(s) method

Appendix

@boesing boesing added the RFC label Feb 13, 2023
@boesing boesing added this to the 4.0.0 milestone Feb 13, 2023
@boesing boesing linked a pull request Mar 5, 2023 that will close this issue
5 tasks
@boesing boesing changed the title [RFC]: Mark ServiceManager as final and change AbstractPluginManager to use composition over inheritance Mark ServiceManager as final and change AbstractPluginManager to use composition over inheritance May 2, 2023
@boesing
Copy link
Member Author

boesing commented May 2, 2023

ServiceManager is marked as soft-final as of 4.0.0 and will become final class in 5.0.0

@boesing
Copy link
Member Author

boesing commented May 2, 2023

Closed by #179

@boesing boesing closed this as completed May 2, 2023
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 a pull request may close this issue.

1 participant