File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 66 "ext-json" : " *" ,
77 "symfony/console" : " ^3.4 || ^4.0" ,
88 "symfony/filesystem" : " ^2.7 || ^3.4 || ^4.0" ,
9- "twig/twig" : " ^1.38.2 || ^2.10 "
9+ "twig/twig" : " ^1.41 || ^2.12 "
1010 },
1111 "bin" : [
1212 " bin/dcg"
Original file line number Diff line number Diff line change 33namespace DrupalCodeGenerator \Helper ;
44
55use Symfony \Component \Console \Helper \Helper ;
6- use Twig_Environment ;
6+ use Twig \ Environment ;
77
88/**
99 * Output dumper form generators.
@@ -13,17 +13,17 @@ class Renderer extends Helper {
1313 /**
1414 * The twig environment.
1515 *
16- * @var \Twig_Environment
16+ * @var \Twig\Environment
1717 */
1818 protected $ twig ;
1919
2020 /**
2121 * Constructs a generator command.
2222 *
23- * @param \Twig_Environment $twig
23+ * @param \Twig\Environment $twig
2424 * The twig environment.
2525 */
26- public function __construct (Twig_Environment $ twig ) {
26+ public function __construct (Environment $ twig ) {
2727 $ this ->twig = $ twig ;
2828 }
2929
Original file line number Diff line number Diff line change 66 */
77
88use DrupalCodeGenerator \ApplicationFactory ;
9+ use Twig \Environment ;
910
1011/**
1112 * DCG root.
@@ -31,13 +32,13 @@ function dcg_create_application() {
3132}
3233
3334// Determine major Twig version.
34- // Twig_Environment ::MAJOR_VERSION is not suitable here because of
35+ // \Twig\Environment ::MAJOR_VERSION is not suitable here because of
3536// https://github.com/twigphp/Twig/pull/2945
3637// Use this workaround as drupal/drupal is locked on Twig 1.38.
37- list ($ twig_major_version ) = sscanf (Twig_Environment ::VERSION , '%d.%d.%d ' );
38+ list ($ twig_major_version ) = sscanf (Environment ::VERSION , '%d.%d.%d ' );
3839
39- // Twig_Environment ::tokenize() signature has been changed in Twig 2, so that
40- // it is not possible to maintain the same Twig_Environment sub-class for both
40+ // \Twig\Environment ::tokenize() signature has been changed in Twig 2, so that
41+ // it is not possible to maintain the same \Twig\Environment sub-class for both
4142// Twig versions.
4243$ twig_environment_class = sprintf ('DrupalCodeGenerator\Twig\Twig%dEnvironment ' , $ twig_major_version );
4344class_alias ($ twig_environment_class , 'DrupalCodeGenerator\Twig\TwigEnvironment ' );
You can’t perform that action at this time.
0 commit comments