1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 01:22:54 +00:00

addPackage needs to trigger initialization too

This commit is contained in:
Jordi Boggiano 2011-05-22 09:10:03 +02:00
parent 575e520931
commit 05d527446b

View file

@ -30,6 +30,9 @@ class ArrayRepository implements RepositoryInterface
*/
public function addPackage(PackageInterface $package)
{
if (null === $this->packages) {
$this->initialize();
}
$package->setRepository($this);
$this->packages[] = $package;
}