Merge "registration: Fix caching of load_composer_autoloader"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 25 Sep 2017 15:22:39 +0000 (15:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 25 Sep 2017 15:22:39 +0000 (15:22 +0000)
includes/registration/ExtensionProcessor.php
includes/registration/ExtensionRegistry.php

index ce262bd..ffc7a7e 100644 (file)
@@ -520,10 +520,7 @@ class ExtensionProcessor implements Processor {
        public function getExtraAutoloaderPaths( $dir, array $info ) {
                $paths = [];
                if ( isset( $info['load_composer_autoloader'] ) && $info['load_composer_autoloader'] === true ) {
-                       $path = "$dir/vendor/autoload.php";
-                       if ( file_exists( $path ) ) {
-                               $paths[] = $path;
-                       }
+                       $paths[] = "$dir/vendor/autoload.php";
                }
                return $paths;
        }
index bf33c6c..740fed4 100644 (file)
@@ -319,7 +319,9 @@ class ExtensionRegistry {
                        define( $name, $val );
                }
                foreach ( $info['autoloaderPaths'] as $path ) {
-                       require_once $path;
+                       if ( file_exists( $path ) ) {
+                               require_once $path;
+                       }
                }
 
                $this->loaded += $info['credits'];