createPackage() method should use the $class argument it accepts
parent
546730dcf3
commit
f1cf5d64dd
|
@ -370,7 +370,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
||||||
}
|
}
|
||||||
|
|
||||||
// load acceptable packages in the providers
|
// load acceptable packages in the providers
|
||||||
$package = $this->createPackage($version, 'Composer\Package\Package');
|
$package = $this->createPackage($version, 'Composer\Package\CompletePackage');
|
||||||
$package->setRepository($this);
|
$package->setRepository($this);
|
||||||
|
|
||||||
if ($package instanceof AliasPackage) {
|
if ($package instanceof AliasPackage) {
|
||||||
|
@ -606,14 +606,14 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
||||||
return $packages;
|
return $packages;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function createPackage(array $data, $class)
|
protected function createPackage(array $data, $class = 'Composer\Package\CompletePackage')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!isset($data['notification-url'])) {
|
if (!isset($data['notification-url'])) {
|
||||||
$data['notification-url'] = $this->notifyUrl;
|
$data['notification-url'] = $this->notifyUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
$package = $this->loader->load($data, 'Composer\Package\CompletePackage');
|
$package = $this->loader->load($data, $class);
|
||||||
if (isset($this->sourceMirrors[$package->getSourceType()])) {
|
if (isset($this->sourceMirrors[$package->getSourceType()])) {
|
||||||
$package->setSourceMirrors($this->sourceMirrors[$package->getSourceType()]);
|
$package->setSourceMirrors($this->sourceMirrors[$package->getSourceType()]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue