Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Lock][Semaphore] Add Factory::createFromKey and deprecate lock.store services#38593

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.xfromjderusse:lock-deprecat
Oct 16, 2020

Conversation

@jderusse
Copy link
Member

@jderussejderusse commentedOct 15, 2020
edited
Loading

I| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | /
| License | MIT
| Doc PR | todo

Thelock service and aliases have been deprecated in#38576. This PR also deprecate thelock.store service and aliases.

People should always inject the factory into their services, except for one scenario: When they want building theLock manually because they want to keep the key.

This scenario require declaringlock.store service andPersisingStoreInterface aliases.
This could be avoided if people had a method to create a lock from a given key.

This PR adds aLockFactory::createFromKey() method and deprecate alllock.store services

I also updated the Semaphore component for consistency, and helping people to only inject the SemahoreFactory.

nb: use cases for serializing the keys:

  • Netflix allows only 5 users of the same family at the same time.
  • An holiday apartment rental avoid users putting the same apartment in the basket
  • ...

@fabpot
Copy link
Member

Thank you@jderusse.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@jderusse@fabpot@derrabus@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp