Fix loading files for plugins/scripts (#10279)
parent
410771af36
commit
0662fa2662
|
@ -621,12 +621,6 @@ EOF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($autoloads['files'])) {
|
|
||||||
foreach ($autoloads['files'] as $fileIdentifier => $file) {
|
|
||||||
composerRequire($fileIdentifier, $file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $loader;
|
return $loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -508,6 +508,12 @@ class EventDispatcher
|
||||||
$this->loader = $generator->createLoader($map, $this->composer->getConfig()->get('vendor-dir'));
|
$this->loader = $generator->createLoader($map, $this->composer->getConfig()->get('vendor-dir'));
|
||||||
$this->loader->register(false);
|
$this->loader->register(false);
|
||||||
|
|
||||||
|
if (isset($map['files'])) {
|
||||||
|
foreach ($map['files'] as $fileIdentifier => $file) {
|
||||||
|
\Composer\Autoload\composerRequire($fileIdentifier, $file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $scripts[$event->getName()];
|
return $scripts[$event->getName()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -201,6 +201,12 @@ class PluginManager
|
||||||
$classLoader = $generator->createLoader($map, $this->composer->getConfig()->get('vendor-dir'));
|
$classLoader = $generator->createLoader($map, $this->composer->getConfig()->get('vendor-dir'));
|
||||||
$classLoader->register(false);
|
$classLoader->register(false);
|
||||||
|
|
||||||
|
if (isset($map['files'])) {
|
||||||
|
foreach ($map['files'] as $fileIdentifier => $file) {
|
||||||
|
\Composer\Autoload\composerRequire($fileIdentifier, $file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($classes as $class) {
|
foreach ($classes as $class) {
|
||||||
if (class_exists($class, false)) {
|
if (class_exists($class, false)) {
|
||||||
$class = trim($class, '\\');
|
$class = trim($class, '\\');
|
||||||
|
|
Loading…
Reference in New Issue