Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Entity Listeners] always lazy load via ServiceLocator #899

Closed
dmaicher opened this issue Dec 13, 2018 · 4 comments
Closed

[Entity Listeners] always lazy load via ServiceLocator #899

dmaicher opened this issue Dec 13, 2018 · 4 comments
Labels
⭐️ EUFOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming Feature
Milestone

Comments

@dmaicher
Copy link
Contributor

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?

@alcaeus
Copy link
Member

alcaeus commented Dec 18, 2018

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

@alcaeus
Copy link
Member

alcaeus commented Dec 20, 2018

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.

@dmaicher
Copy link
Contributor Author

dmaicher commented Apr 7, 2019

Looking into this now at EUFOSSA hackathon 👍

@alcaeus alcaeus added the ⭐️ EUFOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming label Apr 7, 2019
@alcaeus alcaeus added this to the 1.11.0 milestone Apr 12, 2019
@alcaeus
Copy link
Member

alcaeus commented Apr 12, 2019

Closing as #951 was merged 🎉

@alcaeus alcaeus closed this as completed Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐️ EUFOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming Feature
Projects
None yet
Development

No branches or pull requests

2 participants