-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
EZP-30546: Cache service has wrong instance on command line #2634
Conversation
While not the bug itself, these commands where loading cache before siteaccess where set worsening the issue with cache pool not being right instance. Make them lazy to avoid similar issues for other services, and avoid having to load them unless used.
PR is ready for Review, failure on AppVeyor is unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, I rather aimed to autowire and autoconfigure commands at some point :(
+1 anyway.
And there is no way to make them lazy then unless you change to make them container aware instead then right? ... :P |
Yeah, I know, just complaining to complain ;) Seems we have no other choice for now. |
Well, lazy commands is not an option for 6.7 and 6.13 as it's Symfony 3.4+ only. So if you dislike them we can skip them. The solution is then always 1. Use Config Resolver 2. For services made with factory that depends on SA config, opt for using lazy service. And of course somehow figure out to detect when loaded to early as is WIP on the other PR. |
7.5
Cache service being in wrong instance seems to be caused by a few things:
ezplublish.cache_pool.inner
service was introduced ( 8baa4f4) seems to cause it to no longer be lazy loaded.ezpublish.cache_pool
.TODO:
$ composer fix-cs
).