-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Add a way to use custom lock factory in lockableTrait #54135
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
Conversation
Hey! Thanks for your PR. You are targeting branch "7.1" but it seems your PR description refers to branch "7.1 for features". Cheers! Carsonbot |
it could be a valuable addition indeed, |
I also saw symfony/symfony-docs#20210. I currently find the LockableTrait really confusing because when using it (without reading the code inside) you could expect that the trait use the default configured lock factory instead of creating a new one. I was trying to improve the situation... |
Yes and you do good i think but may it will leverage discussion |
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.
Tests? 🙃
12b0f44
to
060cad3
Compare
Indeed, I added some now @derrabus |
060cad3
to
28c73f8
Compare
Thank you @VincentLanglet. |
The LockableTrait only use SemaphoreStore or FlockStore, but currently we cannot use MemcachedStore or RedisStore.
When using a custom LockFactory everywhere in the codebase, it would be useful to chose if the commande need a server-related store or not.
I'm not sure if I have a way to provide autowire to the
setLockFactory
method without introducing a BC break for people who rely on the fact that the LockableTrait use a different LockFactory than the one configured theframework.lock
dsn.