Skip to content

Commit 975189d

Browse files
authored
Merge pull request #37 from magento-thunder/MAGECLOUD-1049
MAGECLOUD-1049: [develop] Exception during deploy with skipped di compilation
2 parents 1bcb8d0 + 7beeafa commit 975189d

File tree

3 files changed

+2
-34
lines changed

3 files changed

+2
-34
lines changed

src/Magento/MagentoCloud/Config/Build.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
*/
1313
class Build
1414
{
15-
const BUILD_OPT_SKIP_DI_COMPILATION = 'skip_di_compilation';
16-
const BUILD_OPT_SKIP_DI_CLEARING = 'skip_di_clearing';
1715
const BUILD_OPT_SCD_EXCLUDE_THEMES = 'exclude_themes';
1816
const BUILD_OPT_SCD_THREADS = 'scd_threads';
1917
const BUILD_OPT_SKIP_SCD = 'skip_scd';

src/Magento/MagentoCloud/Process/Build/CompileDi.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,8 @@ public function execute()
7373
$verbosityLevel = $this->buildConfig->getVerbosityLevel();
7474

7575
if ($this->file->isExists($configFile)) {
76-
if (!$this->buildConfig->get(BuildConfig::BUILD_OPT_SKIP_DI_COMPILATION)) {
77-
$this->logger->info('Running DI compilation');
78-
$this->shell->execute("php ./bin/magento setup:di:compile {$verbosityLevel}");
79-
} else {
80-
$this->logger->info('Skip running DI compilation');
81-
}
76+
$this->logger->info('Running DI compilation');
77+
$this->shell->execute("php ./bin/magento setup:di:compile {$verbosityLevel}");
8278
} else {
8379
$this->logger->info(
8480
"Missing config.php, please run the following commands "

src/Magento/MagentoCloud/Test/Unit/Process/Build/CompileDiTest.php

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ public function testExecute()
8989
->method('isExists')
9090
->with('magento_root/app/etc/config.php')
9191
->willReturn(true);
92-
$this->buildConfigMock->expects($this->once())
93-
->method('get')
94-
->with(Build::BUILD_OPT_SKIP_DI_COMPILATION)
95-
->willReturn(false);
9692
$this->loggerMock->expects($this->once())
9793
->method('info')
9894
->with('Running DI compilation');
@@ -103,28 +99,6 @@ public function testExecute()
10399
$this->process->execute();
104100
}
105101

106-
public function testExecuteSkipCompilation()
107-
{
108-
$this->buildConfigMock->expects($this->once())
109-
->method('getVerbosityLevel')
110-
->willReturn('-vvv');
111-
$this->fileMock->expects($this->once())
112-
->method('isExists')
113-
->with('magento_root/app/etc/config.php')
114-
->willReturn(true);
115-
$this->buildConfigMock->expects($this->once())
116-
->method('get')
117-
->with(Build::BUILD_OPT_SKIP_DI_COMPILATION)
118-
->willReturn(true);
119-
$this->loggerMock->expects($this->once())
120-
->method('info')
121-
->with('Skip running DI compilation');
122-
$this->shellMock->expects($this->never())
123-
->method('execute');
124-
125-
$this->process->execute();
126-
}
127-
128102
/**
129103
* @expectedException \RuntimeException
130104
* @expectedExceptionMessage Missing config.php file

0 commit comments

Comments
 (0)