|
12 | 12 | use Magento\Framework\App\Cache\Type\Block as BlockCache;
|
13 | 13 | use Magento\Framework\App\Cache\Type\Config as ConfigCache;
|
14 | 14 | use Magento\Framework\App\Cache\Type\Layout as LayoutCache;
|
| 15 | +use Magento\Framework\App\DeploymentConfig; |
15 | 16 | use Magento\Framework\App\DeploymentConfig\Reader;
|
16 | 17 | use Magento\Framework\App\DeploymentConfig\Writer;
|
17 | 18 | use Magento\Framework\App\Filesystem\DirectoryList;
|
18 | 19 | use Magento\Framework\App\MaintenanceMode;
|
| 20 | +use Magento\Framework\App\ObjectManager; |
19 | 21 | use Magento\Framework\App\State\CleanupFiles;
|
20 | 22 | use Magento\Framework\Component\ComponentRegistrar;
|
21 | 23 | use Magento\Framework\Config\ConfigOptionsListConstants;
|
@@ -175,10 +177,15 @@ class Installer
|
175 | 177 | private $installInfo = [];
|
176 | 178 |
|
177 | 179 | /**
|
178 |
| - * @var \Magento\Framework\App\DeploymentConfig |
| 180 | + * @var DeploymentConfig |
179 | 181 | */
|
180 | 182 | private $deploymentConfig;
|
181 | 183 |
|
| 184 | + /** |
| 185 | + * @var DeploymentConfig |
| 186 | + */ |
| 187 | + private $firstDeploymentConfig; |
| 188 | + |
182 | 189 | /**
|
183 | 190 | * @var ObjectManagerProvider
|
184 | 191 | */
|
@@ -327,6 +334,11 @@ public function __construct(
|
327 | 334 | $this->phpReadinessCheck = $phpReadinessCheck;
|
328 | 335 | $this->schemaPersistor = $this->objectManagerProvider->get()->get(SchemaPersistor::class);
|
329 | 336 | $this->triggerCleaner = $this->objectManagerProvider->get()->get(TriggerCleaner::class);
|
| 337 | + /* Note: Because this class is dependency injected with Laminas ServiceManager, but our plugins, and some |
| 338 | + * other classes also use the App\ObjectManager instead, we have to make sure that the DeploymentConfig object |
| 339 | + * from that ObjectManager gets reset as different steps in the installer will write to the deployment config. |
| 340 | + */ |
| 341 | + $this->firstDeploymentConfig = ObjectManager::getInstance()->get(DeploymentConfig::class); |
330 | 342 | }
|
331 | 343 |
|
332 | 344 | /**
|
@@ -381,6 +393,9 @@ public function install($request)
|
381 | 393 | $this->log->log('Starting Magento installation:');
|
382 | 394 |
|
383 | 395 | foreach ($script as $item) {
|
| 396 | + /* Note: Because the $this->DeploymentConfig gets written to, but plugins use $this->firstDeploymentConfig, |
| 397 | + * we have to reset this one after each item of $script so the plugins will see the config updates. */ |
| 398 | + $this->firstDeploymentConfig->resetData(); |
384 | 399 | list($message, $method, $params) = $item;
|
385 | 400 | $this->log->log($message);
|
386 | 401 | try {
|
|
0 commit comments