/** * @param Package $package * @return $this * @throws \Exception */ public function addPackage(Package $package) { if ($package->getType() == 'magento-core') { $this->setCorePackage($package); } else { $this->extensions[] = $package; } return $this; }