Merge pull request #4799 from balbuf/balbuf/honor-class-name
createPackage() method should use the $class argument it acceptspull/3503/merge
commit
6825c04a62
|
@ -359,7 +359,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|||
}
|
||||
|
||||
// load acceptable packages in the providers
|
||||
$package = $this->createPackage($version, 'Composer\Package\Package');
|
||||
$package = $this->createPackage($version, 'Composer\Package\CompletePackage');
|
||||
$package->setRepository($this);
|
||||
|
||||
if ($package instanceof AliasPackage) {
|
||||
|
@ -583,14 +583,14 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|||
return $packages;
|
||||
}
|
||||
|
||||
protected function createPackage(array $data, $class)
|
||||
protected function createPackage(array $data, $class = 'Composer\Package\CompletePackage')
|
||||
{
|
||||
try {
|
||||
if (!isset($data['notification-url'])) {
|
||||
$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()])) {
|
||||
$package->setSourceMirrors($this->sourceMirrors[$package->getSourceType()]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue