mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-27 16:36:00 +00:00
Replace LifecycleEventArgs by PreRemoveEventArgs
This commit is contained in:
parent
c9301bd0b3
commit
402d80cd30
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ namespace Wallabag\Event\Subscriber;
|
||||||
|
|
||||||
use Doctrine\Common\EventSubscriber;
|
use Doctrine\Common\EventSubscriber;
|
||||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||||
use Doctrine\ORM\Event\LifecycleEventArgs;
|
use Doctrine\ORM\Event\PreRemoveEventArgs;
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
use Wallabag\Entity\Entry;
|
use Wallabag\Entity\Entry;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class SQLiteCascadeDeleteSubscriber implements EventSubscriber
|
||||||
* We removed everything related to the upcoming removed entry because SQLite can't handle it on it own.
|
* We removed everything related to the upcoming removed entry because SQLite can't handle it on it own.
|
||||||
* We do it in the preRemove, because we can't retrieve tags in the postRemove (because the entry id is gone).
|
* We do it in the preRemove, because we can't retrieve tags in the postRemove (because the entry id is gone).
|
||||||
*/
|
*/
|
||||||
public function preRemove(LifecycleEventArgs $args)
|
public function preRemove(PreRemoveEventArgs $args)
|
||||||
{
|
{
|
||||||
$entity = $args->getObject();
|
$entity = $args->getObject();
|
||||||
if (!$this->doctrine->getConnection()->getDatabasePlatform() instanceof SqlitePlatform
|
if (!$this->doctrine->getConnection()->getDatabasePlatform() instanceof SqlitePlatform
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue