-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
DoctrineactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)
Milestone
Description
As mentioned at the end of Creating the Listener Class paragraph from event listeners and subscribers doctrine cookbook, entity listeners are introduced in Doctrine 2.4.
An entity listener is a lifecycle listener class used for a specific entity. Entity listeners can be defined as services and the great thing is that they can have container services/parameters injected. Shouldn't this be documented? For example:
services:
user_listener:
class: \UserListener
arguments:
- "%some_param%"
tags:
- { name: doctrine.orm.entity_listener }
- { name: doctrine.orm.entity_listener, entity_manager: custom }
Entity listeners are barely mentioned here. This was ticket was opened as a suggestion.
miguelgf, HypeMC, mecanisoft and jonny-no1
Metadata
Metadata
Assignees
Labels
DoctrineactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)