You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
RFC
Goal
Remove inheritance of
ServiceManager
.Background
Besides the fact that composition over inheritance should be preferred, the
AbstractPluginManager
is overriding methods fromServiceManager
which should be delegated instead.Considerations
Upstream projects might type against
PluginManagerInterface
or the specific plugin manager instance instead of typing againstServiceManager
and thus the BC break would be not too big.Proposal(s)
ServiceManager
instance within__construct
and configure that service manager with the config for the plugin manager.ServiceManager
specific public methodsget
,has
,build
as declared withinPluginManagerInterface
ConfigurableInterface
which providesconfigure
method to consumeServiceManagerConfigurationType
which passes the argument to the pluginmanager relatedServiceManager
PluginManagerInterface
implementConfigurableInterface
so that all plugin managers have to implement that interface(s) methodAppendix
The text was updated successfully, but these errors were encountered: