Details
Description
There is often the feature request that the EM should be accessible in entities when events are triggered.
We should allow entities or repositories to implement EventSubscriber and trigger events accordingly, or find some other scheme to do so.
Currently event subscribers are called for ALL entities, this could lead to a performance increase when only triggering listeners for entities that need them.
fixed : https://github.com/doctrine/doctrine2/commit/71a68a5c6fcd49538c3ef2f86d64bcde1958251c