Only pass remotefilesystem when needed, fixes #4779
parent
d7c61c50ad
commit
974fb4ac66
|
@ -105,9 +105,15 @@ class RepositoryManager
|
||||||
|
|
||||||
$class = $this->repositoryClasses[$type];
|
$class = $this->repositoryClasses[$type];
|
||||||
|
|
||||||
|
$reflMethod = new \ReflectionMethod($class, '__construct');
|
||||||
|
$params = $reflMethod->getParameters();
|
||||||
|
if (isset($params[4]) && $params[4]->getType()->__toString() === 'Composer\Util\RemoteFilesystem') {
|
||||||
return new $class($config, $this->io, $this->config, $this->eventDispatcher, $this->rfs);
|
return new $class($config, $this->io, $this->config, $this->eventDispatcher, $this->rfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return new $class($config, $this->io, $this->config, $this->eventDispatcher);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores repository class for a specific installation type.
|
* Stores repository class for a specific installation type.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue