From 795a1443439b0965fb1de354efd15249d5454cc2 Mon Sep 17 00:00:00 2001 From: Christoph Massmann Date: Wed, 10 Nov 2021 15:46:01 +0100 Subject: [PATCH] made use of proxies for the product export command to use it in uninitialized environments (like Magento automated testing) --- Console/Command/ProductExportCommand.php | 15 ++------------- etc/di.xml | 8 ++++++++ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Console/Command/ProductExportCommand.php b/Console/Command/ProductExportCommand.php index 3cc7dc1..0849da1 100644 --- a/Console/Command/ProductExportCommand.php +++ b/Console/Command/ProductExportCommand.php @@ -21,20 +21,12 @@ class ProductExportCommand extends Command { - /** - * @var \Recolize\RecommendationEngine\Model\Feed - */ + /** @var \Recolize\RecommendationEngine\Model\Feed */ private $feed; - /** - * @var \Magento\Framework\App\State - */ + /** @var \Magento\Framework\App\State */ private $state; - /** - * @param \Magento\Framework\App\State $state - * @param \Recolize\RecommendationEngine\Model\Feed $feed - */ public function __construct( \Magento\Framework\App\State $state, \Recolize\RecommendationEngine\Model\Feed $feed @@ -60,9 +52,6 @@ protected function configure() /** * Triggers the feed generation. * - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param \Symfony\Component\Console\Output\OutputInterface $output - * * @return integer|null */ protected function execute(InputInterface $input, OutputInterface $output) diff --git a/etc/di.xml b/etc/di.xml index 384f11c..cb57ee4 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -13,9 +13,17 @@ recolize + Recolize\RecommendationEngine\Model\Session\Storage + + + + Magento\Framework\App\State\Proxy + Recolize\RecommendationEngine\Model\Feed\Proxy + + \ No newline at end of file