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

Change ZendViewRenderer to DI only; remove fallback dependency setup #1

Open
6 of 8 tasks
weierophinney opened this issue Dec 31, 2019 · 0 comments
Open
6 of 8 tasks
Labels

Comments

@weierophinney
Copy link
Contributor

Provide a narrative description of what you are trying to accomplish:

This PR removes fallback PhpRenderer setup from ZendViewRenderer and moves NamespacedPathStackResolver setup into factory.
ZendViewRenderer requires zend-view renderer and NamespacedPathStackResolver to be explicitly provided at creation time; It won't try to inspect or configure zend-view renderer resolvers and expects them to be configured beforehand.

  • Are you creating a new feature?
    • Why is the new feature needed? What purpose does it serve?
      This greatly simplifies template renderer and forces separation of concern to avoid the need to modify template renderer to configure its dependencies as has been done in Merge release 2.16.0 into 3.0.x #64
      Extra ZendViewRenderer parameter added in Merge release 2.16.0 into 3.0.x #64 is dropped in this PR as that feature is moved into factory.
    • How will users use the new feature?
      Users depending on Zend\Expressive\ZendView\ConfigProvider to configure their container can continue to use the same provided services without change.
      Users directly instantiating Zend\Expressive\ZendView\ZendViewRenderer will need to update their code to provide zend-view renderer (PhpRenderer by default) and NamespacedPathStackResolver as constructor parameters; zend-view renderer is expected to be already configured with NamespacedPathStackResolver.
    • Base your feature on the develop branch, and submit against that branch.
    • Add only one feature per pull request; split multiple features over multiple pull requests
    • Add tests for the new feature.
    • Add documentation for the new feature.
    • Add a CHANGELOG.md entry for the new feature.

Originally posted by @Xerkus at zendframework/zend-expressive-zendviewrenderer#66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant