Skip to content

Commit 748f623

Browse files
committed
magento/adobe-stock-integration#1784: Remove area emulation from media-content:sync command - remove area emulation
1 parent 1ce8bcb commit 748f623

File tree

1 file changed

+2
-17
lines changed
  • app/code/Magento/MediaContentSynchronization/Console/Command

1 file changed

+2
-17
lines changed

app/code/Magento/MediaContentSynchronization/Console/Command/Synchronize.php

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
namespace Magento\MediaContentSynchronization\Console\Command;
99

10-
use Magento\Framework\App\Area;
11-
use Magento\Framework\App\State;
1210
use Magento\Framework\Console\Cli;
1311
use Magento\MediaContentSynchronizationApi\Api\SynchronizeInterface;
1412
use Symfony\Component\Console\Command\Command;
@@ -25,21 +23,13 @@ class Synchronize extends Command
2523
*/
2624
private $synchronizeContent;
2725

28-
/**
29-
* @var State $state
30-
*/
31-
private $state;
32-
3326
/**
3427
* @param SynchronizeInterface $synchronizeContent
35-
* @param State $state
3628
*/
3729
public function __construct(
38-
SynchronizeInterface $synchronizeContent,
39-
State $state
30+
SynchronizeInterface $synchronizeContent
4031
) {
4132
$this->synchronizeContent = $synchronizeContent;
42-
$this->state = $state;
4333
parent::__construct();
4434
}
4535

@@ -58,12 +48,7 @@ protected function configure()
5848
protected function execute(InputInterface $input, OutputInterface $output)
5949
{
6050
$output->writeln('Synchronizing content with assets...');
61-
$this->state->emulateAreaCode(
62-
Area::AREA_ADMINHTML,
63-
function () {
64-
$this->synchronizeContent->execute();
65-
}
66-
);
51+
$this->synchronizeContent->execute();
6752
$output->writeln('Completed content synchronization.');
6853
return Cli::RETURN_SUCCESS;
6954
}

0 commit comments

Comments
 (0)