Skip to content

Commit 5b91a35

Browse files
committed
Merge remote-tracking branch 'mainline/master'
2 parents faa593e + 9a415d7 commit 5b91a35

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

src/MagentoHackathon/Composer/Magento/DeployManager.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,14 @@ public function doDeploy()
9090
if ($this->io->isDebug()) {
9191
$this->io->write('start magento deploy for ' . $package->getPackageName());
9292
}
93-
$package->getDeployStrategy()->deploy();
93+
try {
94+
$package->getDeployStrategy()->deploy();
95+
} catch (\ErrorException $e) {
96+
if ($this->io->isDebug()) {
97+
$this->io->write($e->getMessage());
98+
}
99+
}
100+
94101
}
95102
}
96103
}

src/MagentoHackathon/Composer/Magento/Installer.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ public function __construct(IOInterface $io, Composer $composer, $type = 'magent
175175
$this->isForced = (bool)$extra['magento-force'];
176176
}
177177

178+
if (false !== getenv('PLATFORM_PROJECT')) {
179+
$this->setDeployStrategy('none');
180+
}
181+
178182
if (isset($extra['magento-deploystrategy'])) {
179183
$this->setDeployStrategy((string)$extra['magento-deploystrategy']);
180184
}
@@ -605,7 +609,13 @@ public function update(InstalledRepositoryInterface $repo, PackageInterface $ini
605609
if ($this->hasExtraMap($initial)) {
606610
$initialStrategy = $this->getDeployStrategy($initial);
607611
$initialStrategy->setMappings($this->getParser($initial)->getMappings());
608-
$initialStrategy->clean();
612+
try {
613+
$initialStrategy->clean();
614+
} catch (\ErrorException $e) {
615+
if ($this->io->isDebug()) {
616+
$this->io->write($e->getMessage());
617+
}
618+
}
609619
}
610620

611621
parent::update($repo, $initial, $target);
@@ -712,7 +722,13 @@ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $
712722

713723
$strategy = $this->getDeployStrategy($package);
714724
$strategy->setMappings($this->getParser($package)->getMappings());
715-
$strategy->clean();
725+
try {
726+
$strategy->clean();
727+
} catch (\ErrorException $e) {
728+
if ($this->io->isDebug()) {
729+
$this->io->write($e->getMessage());
730+
}
731+
}
716732

717733
parent::uninstall($repo, $package);
718734
}

0 commit comments

Comments
 (0)