Skip to content

Commit faa593e

Browse files
committed
MAGETWO-50934: setup:upgrade failed during CLI upgrade from CE 2.0.x to 2.1.0
- moving touch to plugin
1 parent 1af5055 commit faa593e

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/MagentoHackathon/Composer/Magento/Installer.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ class Installer extends LibraryInstaller implements InstallerInterface
6161
*/
6262
protected $_deployStrategy = "copy";
6363

64-
/**
65-
* @var string
66-
*/
67-
private $regeneratePath = '/var/.regenerate';
68-
6964
const MAGENTO_REMOVE_DEV_FLAG = 'magento-remove-dev';
7065
const MAGENTO_MAINTANANCE_FLAG = 'maintenance.flag';
7166
const MAGENTO_CACHE_PATH = 'var/cache';
@@ -424,8 +419,6 @@ public function install(InstalledRepositoryInterface $repo, PackageInterface $pa
424419
if ($this->appendGitIgnore) {
425420
$this->appendGitIgnore($package, $this->getGitIgnoreFileLocation());
426421
}
427-
428-
touch($this->magentoRootDir->getPathname() . $this->regeneratePath);
429422
}
430423

431424
/**
@@ -634,8 +627,6 @@ public function update(InstalledRepositoryInterface $repo, PackageInterface $ini
634627
if ($target->getType() === 'magento-core') {
635628
$this->postUpdateMagentoCore();
636629
}
637-
638-
touch($this->magentoRootDir . $this->regeneratePath);
639630
}
640631

641632

src/MagentoHackathon/Composer/Magento/Plugin.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ class Plugin implements PluginInterface, EventSubscriberInterface
5959
*/
6060
protected $filesystem;
6161

62+
/**
63+
* @var string
64+
*/
65+
private $regenerate = '/var/.regenerate';
66+
6267
protected function initDeployManager(Composer $composer, IOInterface $io)
6368
{
6469
$this->deployManager = new DeployManager($io);
@@ -144,6 +149,8 @@ public function onNewCodeEvent(\Composer\Script\CommandEvent $event)
144149
$this->deployManager->doDeploy();
145150
$this->deployLibraries();
146151
$this->saveVendorDirPath($event->getComposer());
152+
$filename = $this->installer->getTargetDir() . $this->regenerate;
153+
touch($filename);
147154
}
148155

149156

0 commit comments

Comments
 (0)