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

Proof-of-concept Twig 2.x integration #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

squidfunk
Copy link

For a client project which has Symfony 3 as a dependency I want to be able to use Patternlab with Twig 2.x, which is the default version bundled with the framework. For this reason I forked the project and created a proof-of-concept working version which might be a good starting point for supporting Twig 2.x. This is the corresponding PR.

I think it would be of great use for many developers, but as there are no tests, I'm not a 100% sure I got everything right. Feel free to comment and see this PR as a work-in-progress.

@squidfunk squidfunk changed the title Proof-of-concept Twing 2.x integration Proof-of-concept Twig 2.x integration Sep 12, 2017
@sghoweri
Copy link

sghoweri commented Nov 4, 2017

Thanks @squidfunk!!

Out of curiosity, have you guys tried using Twig embeds with this implementation?

I'm still experimenting a bit with this locally which, for the most part, works perfectly, however I've noticed that something relating to embeds (but not extends or includes) appears to throw a Twig error relating to a string template not being found...

Have you guys encountered any other problems or strange behavior with this upgrade to Twig v2?

CC @EvanLovely @aleksip

@squidfunk
Copy link
Author

squidfunk commented Nov 6, 2017

To be honest, we switched to patternlab-node and now use twig.js for rendering. The PHP version is so flawed and so slow that we had no choice. twig.js is not a perfect solution, but it works and we can even render twig templates in the browser.

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

Successfully merging this pull request may close these issues.

2 participants