Skip to content

Commit

Permalink
Use postRemove in EventListener.
Browse files Browse the repository at this point in the history
  • Loading branch information
Warxcell committed May 31, 2021
1 parent 7c05a12 commit 2e658d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DependencyInjection/ArxyFilesExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ public function load(array $configs, ContainerBuilder $container): void
}
}

private function createListenerDefinition(string $driver, string $serviceId, bool $preRemove = false): Definition
private function createListenerDefinition(string $driver, string $serviceId): Definition
{
switch ($driver) {
case 'orm':
$definition = new Definition(DoctrineORMListener::class);
$definition->setArgument('$manager', new Reference($serviceId));
$definition->addTag('doctrine.event_listener', ['event' => 'postPersist', 'lazy' => true]);
$definition->addTag('doctrine.event_listener', ['event' => 'preRemove', 'lazy' => true]);
$definition->addTag('doctrine.event_listener', ['event' => 'postRemove', 'lazy' => true]);
$definition->addTag('doctrine.event_listener', ['event' => 'onClear', 'lazy' => true]);

return $definition;
Expand Down

0 comments on commit 2e658d3

Please sign in to comment.