-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
[RFC]: Ship factories, config providers and make use of plugin-installer #121
Comments
@gsteel An example can be found in laminas-feed: |
I guess for view helpers, the important thing is aliases used with But I guess, if all the plugin manager did was receive a list of aliases mapped to something available in a user-supplied container, then the plugin manager could be really straight-forward. The configuration BC break would be significant because all those custom helper factories would need to be moved to |
That's the idea behind it! 😃 |
RFC
Goal
#110 - Yet to be merged or approved, adds config providers that help to centralise configuration, removing config from inside HelperPluginManager for example.
It would be useful to provide factories for the key components in view such as the various renderers and plugin managers and expose these config providers (And maybe also Modules for MVC) to the component installer plugin, and also require that plugin in declared dependencies.
The main reason for shipping factories is they provide an opportunity to document in code how these things should be constructed, how they fit together and provide SA tools and consumers concrete examples of what configuration looks like.
Considerations
mezzio/mezzio-laminasviewrenderer
puts these components togetherProposal(s)
Depending on whether this is first implemented as feature addition in 2.x, Adding final factories for anything that would benefit:
Additionally, at the same time in a 3.x release or as a separate change, ship factories and add constructors for DI for the many helpers to minimise the amount of "reaching into the view" for hidden dependencies when an
Escaper
provided to the constructor is all that's really needed. (Also perhaps removing the inheritance tree from helpers where there is no need for it)The text was updated successfully, but these errors were encountered: