Handle metapackages properly in downloadmanager, fixes #2466
parent
a5c6319d46
commit
1d0cc93fbb
|
@ -101,7 +101,6 @@ class DownloadManager
|
||||||
* Returns downloader for a specific installation type.
|
* Returns downloader for a specific installation type.
|
||||||
*
|
*
|
||||||
* @param string $type installation type
|
* @param string $type installation type
|
||||||
*
|
|
||||||
* @return DownloaderInterface
|
* @return DownloaderInterface
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException if downloader for provided type is not registered
|
* @throws \InvalidArgumentException if downloader for provided type is not registered
|
||||||
|
@ -120,8 +119,7 @@ class DownloadManager
|
||||||
* Returns downloader for already installed package.
|
* Returns downloader for already installed package.
|
||||||
*
|
*
|
||||||
* @param PackageInterface $package package instance
|
* @param PackageInterface $package package instance
|
||||||
*
|
* @return DownloaderInterface|null
|
||||||
* @return DownloaderInterface
|
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException if package has no installation source specified
|
* @throws \InvalidArgumentException if package has no installation source specified
|
||||||
* @throws \LogicException if specific downloader used to load package with
|
* @throws \LogicException if specific downloader used to load package with
|
||||||
|
@ -131,6 +129,10 @@ class DownloadManager
|
||||||
{
|
{
|
||||||
$installationSource = $package->getInstallationSource();
|
$installationSource = $package->getInstallationSource();
|
||||||
|
|
||||||
|
if ('metapackage' === $package->getType()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ('dist' === $installationSource) {
|
if ('dist' === $installationSource) {
|
||||||
$downloader = $this->getDownloader($package->getDistType());
|
$downloader = $this->getDownloader($package->getDistType());
|
||||||
} elseif ('source' === $installationSource) {
|
} elseif ('source' === $installationSource) {
|
||||||
|
|
Loading…
Reference in New Issue