-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Introduces an Empty ConfigProvider and Module #163
Conversation
The introduction of the config provider and module, although largely empty allow consumers to start using them for future compatibility with 3.0 Signed-off-by: George Steel <george@net-glue.co.uk>
Which is not needed at the moment for an application based on laminas-mvc and a Mezzio application which uses mezzio-laminasviewrenderer. 🤔 |
@froschdesign This pull is about being able to clean things up in future, and as we go with future pull requests. As we introduce factories for various "things" over time, they can be added to the config provider, once it exists. In future, everything in ViewHelperManager can be removed from instance properties into the config provider providing a clean reference point so that consumers can easily figure out what is registered and how it should be constructed. It also allows us to say, for new projects in MVC and Mezzio, or when updating, inject the config providers to make the migration path to 3.0 easier when it comes. I'm well aware that the mezzio package does not require this stuff, but in my mind, I believe that certain things currently in the mezzio bridge can be brought into view and removed from there… |
@gsteel |
You and I might read the code, but the rest look at the documentation. 😉 |
@froschdesign I also appreciate the docs comment too… Having the many various config options "documented" in code in the config provider helps those writing real docs to more easily define exactly how and where configuration options should be changed |
Closing this PR - it's stale and of limited value right now particularly because work has started on https://github.com/laminas/laminas-mvc-view |
Description
Adds a
Module
andConfigProvider
that are effectively empty.It's not possible to move all of the view helper configuration into the config provider without breaking BC.
Having them at least present and setup in composer.json for the component installer means that consumers will get used to having the provider/module injected into app config, thereby providing a way to introduce factories for various things on the journey to version 3.0
Theses also provide a useful reference point for documenting the expected keys for various things, like
view_helpers
for helper factories etc andview_helper_config
for helper specific options.Also see #110 for additional context