From 203dcd6d25e319e8a5b4fccbe84114655acebf21 Mon Sep 17 00:00:00 2001 From: Lorenzo Ruozzi Date: Mon, 30 Oct 2023 12:11:30 +0100 Subject: [PATCH] Apply suggestions from code review --- src/Product/Importer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Product/Importer.php b/src/Product/Importer.php index 0184ffcb..d9833278 100644 --- a/src/Product/Importer.php +++ b/src/Product/Importer.php @@ -356,12 +356,12 @@ public function reconcile(array $identifiersToReconcileWith): void $product->setEnabled(false); - $this->dispatchPreEvent($productVariantIdentifierToDisable, 'product_variant', 'update'); + $this->dispatchPreEvent($productVariantToDisable, 'product_variant', 'update'); $this->dispatchPreEvent($product, 'product', 'update'); // TODO We should handle $event->isStopped() where $event is the return value of the dispatchPreEvent method. // See \Sylius\Bundle\ResourceBundle\Controller\ResourceController. $this->productRepository->add($product); - $this->dispatchPostEvent($productVariantIdentifierToDisable, 'product_variant', 'update'); + $this->dispatchPostEvent($productVariantToDisable, 'product_variant', 'update'); $this->dispatchPostEvent($product, 'product', 'update'); } }