Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Make UrlExtension optional #24

Closed
acelaya opened this issue Oct 12, 2017 · 2 comments · Fixed by #25
Closed

Make UrlExtension optional #24

acelaya opened this issue Oct 12, 2017 · 2 comments · Fixed by #25

Comments

@acelaya
Copy link
Contributor

acelaya commented Oct 12, 2017

I have recently migrated two expressive projects from twig to plates, and in both of them I have faced the same problem.

The twigrenderer package includes a set of factories that register a twig extension enabling access to the UrlHelper and the ServerUrlHelper, from the helpers package, but only if both of them are registered in the container.

On the other hand, the platesrenderer package factories force you to register them, otherwise an exception is thrown.

I was not using them in those projects, and I have been forced to install the helpers package and register both services.

Would it make sense to make it optional as in the twigrenderer?

I could provide a PR if you are ok with this idea.

@weierophinney
Copy link
Member

Absolutely - go for it!

@acelaya
Copy link
Contributor Author

acelaya commented Oct 12, 2017

Create pull request #25

weierophinney added a commit that referenced this issue Nov 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants