Skip to content

Commit

Permalink
Safety check in case gedmo/doctrine-extensions not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienHarper committed Oct 15, 2024
1 parent 27ad915 commit 9f73b7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Provider/Doctrine/Auditing/Event/DoctrineSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public function postSoftDelete(LifecycleEventArgs $args): void

public function getSubscribedEvents(): array
{
return [Events::onFlush, SoftDeleteableListener::POST_SOFT_DELETE];
return class_exists(SoftDeleteableListener::class) ?
[Events::onFlush, SoftDeleteableListener::POST_SOFT_DELETE] :
[Events::onFlush];
}

/**
Expand Down

0 comments on commit 9f73b7f

Please sign in to comment.