knapsack-cloud / twig-renderer

Render templates using Twig PHP, via this Node JS renderer.
11 stars 10 forks source link

Drupal 9 upgrade to Twig 2.0 #63

Closed juranosaurustechs closed 1 year ago

juranosaurustechs commented 4 years ago

Given that Drupal 9 is upgrading to Twig to 2.0, will twig-renderer also need to be upgraded to Twig 2.0 syntax to update from old Twig_Function and Twig_Filter classes/interfaces to the new \Twig\TwigFunction and \Twig\TwigFilter respectively?

For reference: https://www.drupal.org/docs/9/how-to-prepare-your-drupal-7-or-8-site-for-drupal-9/preparing-for-use-of-twig-2-in-drupal-9#s-major-changes-include

juranosaurustechs commented 4 years ago

I just figured out that Twig version is set in composer.json. So what is then best practice to upgrade that to Twig 2.0? or will it matter?

mariohernandez commented 4 years ago

I would also be interested in how to get Pattern Lab upgraded to Twig 2.0

juranosaurustechs commented 4 years ago

Hi Mario, as I mentioned on twitter you can use https://github.com/rogeriochaves/npm-force-resolutions to force PL to use twig renderer 2.0.0. Or just DM me on Drupal Twig (or Chaz has my contact info) and I'll be happy to walk you through it.

lquessenberry commented 2 years ago

I am new to Knapsack, but I would also like to do this as well. I have a Composer/PHP version of PL (2.6) and I would like to replace it with patternlab-node (3.x)

andriokha commented 1 year ago

I just wanted to mention that it looks like Twig 2 is supported since #64. I don't know if there are any deprecations that ought to be handled, but otherwise I guess this issue could be closed?

greylabel commented 1 year ago

Twig 3 is now supported in this package.