From c3d7fccfa371ba0fb40742bee0e8ba9891dd508f Mon Sep 17 00:00:00 2001 From: Mateusz Deszert-Klosowski Date: Thu, 19 Nov 2020 09:07:42 +0100 Subject: [PATCH 1/2] Removed one the parameters to fix failing spec --- spec/PropertyBuilder/OptionTaxonsBuilderSpec.php | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/PropertyBuilder/OptionTaxonsBuilderSpec.php b/spec/PropertyBuilder/OptionTaxonsBuilderSpec.php index 87862a19..17fcac68 100644 --- a/spec/PropertyBuilder/OptionTaxonsBuilderSpec.php +++ b/spec/PropertyBuilder/OptionTaxonsBuilderSpec.php @@ -32,7 +32,6 @@ function let( $productOptionValueRepository, $productVariantRepository, $productTaxonsMapper, - 'option', 'taxons' ); } From 4c40c23d07e42a7dff2463ca82bdd17f944ee214 Mon Sep 17 00:00:00 2001 From: Mateusz Deszert-Klosowski Date: Thu, 19 Nov 2020 15:38:06 +0100 Subject: [PATCH 2/2] Behat test fix - to match new event dispatcher --- tests/Behat/Service/Populate.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Behat/Service/Populate.php b/tests/Behat/Service/Populate.php index cfc44669..135846f0 100644 --- a/tests/Behat/Service/Populate.php +++ b/tests/Behat/Service/Populate.php @@ -19,7 +19,7 @@ use FOS\ElasticaBundle\Persister\PagerPersisterInterface; use FOS\ElasticaBundle\Persister\PagerPersisterRegistry; use FOS\ElasticaBundle\Provider\PagerProviderRegistry; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; final class Populate { @@ -75,7 +75,7 @@ public function populateIndex(): void foreach ($indexes as $index) { $event = new IndexPopulateEvent($index, true, $options); - $this->dispatcher->dispatch(IndexPopulateEvent::PRE_INDEX_POPULATE, $event); + $this->dispatcher->dispatch($event); if ($event->isReset()) { $this->resetter->resetIndex($index, true); @@ -86,7 +86,7 @@ public function populateIndex(): void $this->populateIndexType($index, $type, false, $event->getOptions()); } - $this->dispatcher->dispatch(IndexPopulateEvent::POST_INDEX_POPULATE, $event); + $this->dispatcher->dispatch($event); $this->refreshIndex($index); } @@ -101,7 +101,7 @@ public function populateIndex(): void private function populateIndexType(string $index, string $type, bool $reset, array $options): void { $event = new TypePopulateEvent($index, $type, $reset, $options); - $this->dispatcher->dispatch(TypePopulateEvent::PRE_TYPE_POPULATE, $event); + $this->dispatcher->dispatch($event); if ($event->isReset()) { $this->resetter->resetIndexType($index, $type); @@ -116,7 +116,7 @@ private function populateIndexType(string $index, string $type, bool $reset, arr $this->pagerPersister->insert($pager, $options); - $this->dispatcher->dispatch(TypePopulateEvent::POST_TYPE_POPULATE, $event); + $this->dispatcher->dispatch($event); $this->refreshIndex($index); }