Skip to content

Commit 5b28eee

Browse files
author
Ivan Gavryshko
committed
MAGETWO-37710: Setup wizard fails in readiness check when magento is deployed by composer create-project
- fixed missed COMPOSER_HOME directory
1 parent 644af41 commit 5b28eee

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList
110110
*/
111111
const UPLOAD = 'upload';
112112

113+
/**
114+
* Directory to store composer related files (config, cache etc.) in case if composer runs by Magento Application
115+
*/
116+
const COMPOSER_HOME = 'composer_home';
117+
113118
/**
114119
* A suffix for temporary materialization directory where pre-processed files will be written (if necessary)
115120
*/
@@ -145,6 +150,7 @@ public static function getDefaultConfig()
145150
self::TMP_MATERIALIZATION_DIR => [parent::PATH => 'var/view_preprocessed'],
146151
self::TEMPLATE_MINIFICATION_DIR => [parent::PATH => 'var/view_preprocessed/html'],
147152
self::SETUP => [parent::PATH => 'setup/src'],
153+
self::COMPOSER_HOME => [parent::PATH => 'var/composer_home'],
148154
];
149155
return parent::getDefaultConfig() + $result;
150156
}

setup/src/Magento/Setup/Model/ComposerInformation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public function __construct(
5050
throw new \Exception('Composer file not found: ' . $composerJson);
5151
}
5252

53+
putenv('COMPOSER_HOME='.$filesystem->getDirectoryRead(DirectoryList::COMPOSER_HOME)->getAbsolutePath());
54+
5355
// Create Composer
5456
$this->composer = ComposerFactory::create($io, $composerJson);
5557
$this->locker = $this->composer->getLocker();

0 commit comments

Comments
 (0)