PreRemove is never called as a doctrine event listener

I have an event subscriber, however, the preRemove function will never be called, but another event will be called. Is there something I did wrong?

class DocumentSubscriber implements EventSubscriber { private $serviceContainer; public function getSubscribedEvents() { return array( 'postUpdate', 'preRemove', ); } public function setServiceContainer($serviceContainer) { $this->serviceContainer = $serviceContainer; } public function preRemove(LifecycleEventArgs $args) { } public function postUpdate(LifecycleEventArgs $args) { } } 
+4
source share

All Articles