Move the file_exists() check out of the extension processor and into the
extension registry so that it is evaluated at run time instead of during
caching. The prior way is problematic since we don't invalidate the
cache if the existence of the file were to change.
Bug: T176534
Change-Id: I98e4ffdfac9f98397a103966824519afe1375356
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;
}
define( $name, $val );
}
foreach ( $info['autoloaderPaths'] as $path ) {
- require_once $path;
+ if ( file_exists( $path ) ) {
+ require_once $path;
+ }
}
$this->loaded += $info['credits'];