Skip to content

Commit

Permalink
Merge pull request #32 from kricha/master
Browse files Browse the repository at this point in the history
fixes for symfony 4/5 event dispatcher
  • Loading branch information
makasim authored Oct 5, 2020
2 parents 7693a01 + 3c4ad2e commit c7a0cb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Persister/QueuePagerPersister.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function insert(PagerInterface $pager, array $options = array())
$objectPersister = $this->registry->getPersister($options['indexName'], $options['typeName']);

$event = new PrePersistEvent($pager, $objectPersister, $options);
$this->dispatcher->dispatch(Events::PRE_PERSIST, $event);
$this->dispatcher->dispatch($event, Events::PRE_PERSIST);
$pager = $event->getPager();
$options = $event->getOptions();

Expand Down Expand Up @@ -122,7 +122,7 @@ public function insert(PagerInterface $pager, array $options = array())
$errorMessage,
$data['options']
);
$this->dispatcher->dispatch(Events::POST_ASYNC_INSERT_OBJECTS, $event);
$this->dispatcher->dispatch($event, Events::POST_ASYNC_INSERT_OBJECTS);
}

if (microtime(true) > $limitTime) {
Expand All @@ -131,6 +131,6 @@ public function insert(PagerInterface $pager, array $options = array())
}

$event = new PostPersistEvent($pager, $objectPersister, $options);
$this->dispatcher->dispatch(Events::POST_PERSIST, $event);
$this->dispatcher->dispatch($event, Events::POST_PERSIST);
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": "^7.1",
"symfony/framework-bundle": "^3.4|^4.0|^5.0",
"symfony/framework-bundle": "^4.0|^5.0",
"friendsofsymfony/elastica-bundle": "^5.0",
"enqueue/enqueue-bundle": "^0.10"
},
Expand Down

0 comments on commit c7a0cb5

Please sign in to comment.