php - symfony 5 , Doctrine Lifecycle Listeners not running

one text

Solution:

You have a problem in your tag section. According to the official documentation:

The next step is to enable the Doctrine listener in the Symfony application by creating a new service for it and tagging it with the doctrine.event_listener tag

So your service definition should look like this:

App\EventListener\TestOrmListener:
        tags:
            - { name: 'doctrine.event_listener', event: 'postPersist', entity: 'App\Entity\Galery' }

Source