Doctrinebundle: [Entity Listeners] always lazy load via ServiceLocator

Created on 13 Dec 2018  路  4Comments  路  Source: doctrine/DoctrineBundle

Since soon support for Symfony < 3.4 will be dropped we could use a ServiceLocator here

https://github.com/doctrine/DoctrineBundle/blob/master/Mapping/ContainerAwareEntityListenerResolver.php#L20

to and get rid of the lazy attribute completely?

https://github.com/doctrine/DoctrineBundle/blob/master/DependencyInjection/Compiler/EntityListenerPass.php#L44

So we don't have to mark the listeners public anymore and we can always lazily fetch them.

Or is there any reason to not always lazy load them?

Feature 猸愶笍 EUFOSSA Hackathon

All 4 comments

We're working on dropping support for anything < 3.4 in #892, so I'll check that out before finalising the PR.

Just a heads up, I've decided to leave this out from #892 but will be changing this in time for a 1.11 release so we can deprecate the original behaviour. I just need some more time to wrap my head around the logic.

Looking into this now at EUFOSSA hackathon :+1:

Closing as #951 was merged 馃帀

Was this page helpful?
0 / 5 - 0 ratings