Add custom doctrine subscriber for SQLite

Since SQLite doesn’t handle cascade remove by default, we need to handle it manually.

Also some refacto
This commit is contained in:
Jeremy Benoist
2016-10-01 14:01:13 +02:00
parent 98efffc2a6
commit 191564b7f7
5 changed files with 144 additions and 11 deletions

View File

@ -88,6 +88,17 @@ services:
arguments:
- WallabagCoreBundle:Tag
wallabag_core.listener.registration_confirmed:
class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener
arguments:
- "@doctrine.orm.entity_manager"
- "%wallabag_core.theme%"
- "%wallabag_core.items_on_page%"
- "%wallabag_core.rss_limit%"
- "%wallabag_core.language%"
tags:
- { name: kernel.event_subscriber }
wallabag_core.helper.entries_export:
class: Wallabag\CoreBundle\Helper\EntriesExport
arguments:
@ -129,3 +140,10 @@ services:
arguments:
- '@twig'
- '%kernel.debug%'
wallabag_core.subscriber.sqlite_cascade_delete:
class: Wallabag\CoreBundle\Subscriber\SQLiteCascadeDeleteSubscriber
arguments:
- "@doctrine"
tags:
- { name: doctrine.event_subscriber }