Fix getEntity() depreciation

This commit is contained in:
Yassine Guedidi 2023-12-24 20:29:51 +01:00
parent 4846dd00c3
commit 0cbd0ce28a

View File

@ -40,7 +40,7 @@ class SQLiteCascadeDeleteSubscriber implements EventSubscriber
*/ */
public function preRemove(LifecycleEventArgs $args) public function preRemove(LifecycleEventArgs $args)
{ {
$entity = $args->getEntity(); $entity = $args->getObject();
if (!$this->doctrine->getConnection()->getDatabasePlatform() instanceof SqlitePlatform if (!$this->doctrine->getConnection()->getDatabasePlatform() instanceof SqlitePlatform
|| !$entity instanceof Entry) { || !$entity instanceof Entry) {
return; return;