packagePool = $packagePool; $this->queue = $queue; } /** * @inheritdoc */ public function deploy(array $options) { $deployedPackages = []; $packages = $this->packagePool->getPackagesForDeployment($options); foreach ($packages as $package) { /** @var Package $package */ if ($package->isVirtual()) { // skip packages which can not be referenced directly from web ... continue; } // ... and aggregate files from ancestors for others $package->aggregate(); $deployedPackages[] = $package; } foreach ($deployedPackages as $package) { $this->queue->add($package); } $this->queue->process(); return $deployedPackages; } }