File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,7 @@ public function render( $template ) {
8282 */
8383 public function getEnvironment () {
8484 if ( !$ this ->twigEnvironment ) {
85- /*
86- * Check for Composer Package Autoloader class loading
87- */
85+ // Check for Composer Package Autoloader class loading
8886 if (!class_exists ('Twig_Autoloader ' )) {
8987 require_once self ::$ twigDirectory . '/Autoloader.php ' ;
9088 }
@@ -96,9 +94,13 @@ public function getEnvironment() {
9694 self ::$ twigOptions
9795 );
9896
99- $ extension_autoloader = dirname (__FILE__ ) . '/Extension/TwigAutoloader.php ' ;
100- if (file_exists ($ extension_autoloader )) {
101- require_once $ extension_autoloader ;
97+ // Check for Composer Package Autoloader class loading
98+ if (!class_exists ('Twig_Extensions_Autoloader ' )) {
99+ $ extension_autoloader = dirname (__FILE__ ) . '/Extension/TwigAutoloader.php ' ;
100+ if (file_exists ($ extension_autoloader )) require_once $ extension_autoloader ;
101+ }
102+
103+ if (class_exists ('Twig_Extensions_Autoloader ' )) {
102104 Twig_Extensions_Autoloader::register ();
103105
104106 foreach (self ::$ twigExtensions as $ ext ) {
Original file line number Diff line number Diff line change 2020 "php" : " >=5.2.0"
2121 },
2222 "autoload" : {
23- "psr-0" : { "Twig_Extensions_" : " Extension/" }
23+ "psr-0" : { "Twig_Extensions_" : " Views/ Extension/" }
2424 }
2525}
You can’t perform that action at this time.
0 commit comments