Skip to content

Commit 05fefed

Browse files
author
Dmytro Vilchynskyi
committed
MAGETWO-70571: There is no possibility to activate DEBUG logging in production mode
- fixed backward compatibility for failed Semantic Version Checker
1 parent 4834f46 commit 05fefed

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

app/code/Magento/Deploy/Model/Mode.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Magento\Config\Console\Command\ConfigSet\ProcessorFacadeFactory;
2020
use Magento\Config\Console\Command\EmulatedAdminhtmlAreaProcessor;
2121
use Magento\Framework\Exception\LocalizedException;
22+
use Magento\Framework\App\ObjectManager as ObjectManager;
2223

2324
/**
2425
* A class to manage Magento modes
@@ -94,20 +95,25 @@ public function __construct(
9495
Writer $writer,
9596
Reader $reader,
9697
MaintenanceMode $maintenanceMode,
97-
Filesystem $filesystem,
98-
ConfigProvider $configProvider,
99-
ProcessorFacadeFactory $processorFacadeFactory,
100-
EmulatedAdminhtmlAreaProcessor $emulatedAreaProcessor
98+
Filesystem $filesystem = null,
99+
ConfigProvider $configProvider = null,
100+
ProcessorFacadeFactory $processorFacadeFactory = null,
101+
EmulatedAdminhtmlAreaProcessor $emulatedAreaProcessor = null
101102
) {
102103
$this->input = $input;
103104
$this->output = $output;
104105
$this->writer = $writer;
105106
$this->reader = $reader;
106107
$this->maintenanceMode = $maintenanceMode;
107-
$this->filesystem = $filesystem;
108-
$this->configProvider = $configProvider;
109-
$this->processorFacadeFactory = $processorFacadeFactory;
110-
$this->emulatedAreaProcessor = $emulatedAreaProcessor;
108+
109+
$this->filesystem =
110+
$filesystem ?: ObjectManager::getInstance()->get(Filesystem::class);
111+
$this->configProvider =
112+
$configProvider ?: ObjectManager::getInstance()->get(ConfigProvider::class);
113+
$this->processorFacadeFactory =
114+
$processorFacadeFactory ?: ObjectManager::getInstance()->get(ProcessorFacadeFactory::class);
115+
$this->emulatedAreaProcessor =
116+
$emulatedAreaProcessor ?: ObjectManager::getInstance()->get(EmulatedAdminhtmlAreaProcessor::class);
111117
}
112118

113119
/**

0 commit comments

Comments
 (0)