Skip to content

Commit 8339eae

Browse files
MC-32014: Remove google-shopping-ads module from core in 2.4.1
- fix merge conflict
1 parent aac49df commit 8339eae

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

setup/src/Magento/Setup/Console/Command/UpgradeCommand.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Framework\App\State as AppState;
1212
use Magento\Framework\Console\Cli;
1313
use Magento\Framework\Exception\RuntimeException;
14+
use Magento\Framework\Config\CacheInterface;
1415
use Magento\Framework\Setup\ConsoleLogger;
1516
use Magento\Framework\Setup\Declaration\Schema\DryRunLogger;
1617
use Magento\Framework\Setup\Declaration\Schema\OperationsExecutor;
@@ -54,22 +55,30 @@ class UpgradeCommand extends AbstractSetupCommand
5455
*/
5556
private $searchConfigFactory;
5657

58+
/*
59+
* @var CacheInterface
60+
*/
61+
private $cache;
62+
5763
/**
5864
* @param InstallerFactory $installerFactory
5965
* @param SearchConfigFactory $searchConfigFactory
6066
* @param DeploymentConfig $deploymentConfig
6167
* @param AppState|null $appState
68+
* @param CacheInterface|null $cache
6269
*/
6370
public function __construct(
6471
InstallerFactory $installerFactory,
6572
SearchConfigFactory $searchConfigFactory,
6673
DeploymentConfig $deploymentConfig = null,
67-
AppState $appState = null
74+
AppState $appState = null,
75+
CacheInterface $cache = null
6876
) {
6977
$this->installerFactory = $installerFactory;
7078
$this->searchConfigFactory = $searchConfigFactory;
7179
$this->deploymentConfig = $deploymentConfig ?: ObjectManager::getInstance()->get(DeploymentConfig::class);
7280
$this->appState = $appState ?: ObjectManager::getInstance()->get(AppState::class);
81+
$this->cache = $cache ?: ObjectManager::getInstance()->get(CacheInterface::class);
7382
parent::__construct();
7483
}
7584

@@ -131,6 +140,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
131140
$installer = $this->installerFactory->create(new ConsoleLogger($output));
132141
$installer->updateModulesSequence($keepGenerated);
133142
$searchConfig = $this->searchConfigFactory->create();
143+
$this->cache->clean();
134144
$searchConfig->validateSearchEngine();
135145
$installer->removeUnusedTriggers();
136146
$installer->installSchema($request);

0 commit comments

Comments
 (0)