1
0
Fork 0

Only pass remotefilesystem when needed, fixes #4779

pull/4784/head
Jordi Boggiano 2016-01-16 17:45:40 +00:00
parent d7c61c50ad
commit 974fb4ac66
1 changed files with 7 additions and 1 deletions

View File

@ -105,7 +105,13 @@ class RepositoryManager
$class = $this->repositoryClasses[$type];
return new $class($config, $this->io, $this->config, $this->eventDispatcher, $this->rfs);
$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);
}
/**