1
0
Fork 0

Fix loading files for plugins/scripts (#10279)

pull/10281/head
Nicolas Grekas 2021-11-12 09:44:34 +01:00 committed by GitHub
parent 410771af36
commit 0662fa2662
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View File

@ -621,12 +621,6 @@ EOF;
}
}
if (isset($autoloads['files'])) {
foreach ($autoloads['files'] as $fileIdentifier => $file) {
composerRequire($fileIdentifier, $file);
}
}
return $loader;
}

View File

@ -508,6 +508,12 @@ class EventDispatcher
$this->loader = $generator->createLoader($map, $this->composer->getConfig()->get('vendor-dir'));
$this->loader->register(false);
if (isset($map['files'])) {
foreach ($map['files'] as $fileIdentifier => $file) {
\Composer\Autoload\composerRequire($fileIdentifier, $file);
}
}
return $scripts[$event->getName()];
}

View File

@ -201,6 +201,12 @@ class PluginManager
$classLoader = $generator->createLoader($map, $this->composer->getConfig()->get('vendor-dir'));
$classLoader->register(false);
if (isset($map['files'])) {
foreach ($map['files'] as $fileIdentifier => $file) {
\Composer\Autoload\composerRequire($fileIdentifier, $file);
}
}
foreach ($classes as $class) {
if (class_exists($class, false)) {
$class = trim($class, '\\');