-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Lock] Integrate framework #8066
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 task
Question not related to this PR per se: do we have a place to document interfaces that one can use with auto-wiring? Like using |
fabpot
added a commit
to symfony/symfony
that referenced
this pull request
Sep 27, 2017
…russe) This PR was squashed before being merged into the 3.4 branch (closes #22113). Discussion ---------- [Lock] Include lock component in framework bundle | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | symfony/symfony-docs#8066 ## Usage use the best available "out of box" store (semaphore if available, filesyste otherwise) ```yml framework: lock: ~ # lock: true ``` ```php $this->get('lock')->acquire(); $this->get('lock.factory')->createLock('my resource')->acquire(); ``` use a specific store ```yml framework: lock: flock # lock: semaphore # lock: redis://localhost # lock: "%env(MEMCACHED_DSN)%" # lock: ["%env(REDIS_DSN_1)%", "%env(REDIS_DSN_2)%"] ``` ```php $this->get('lock')->acquire(); $this->get('lock.factory')->createLock('my resource')->acquire(); ``` use a named lock ```yml framework: lock: foo: flock bar: redis://localhost ``` ```php $this->get('lock.foo')->acquire(); $this->get('lock.bar.factory')->createLock('my resource')->acquire(); ``` factory usage ```xml <service id="acme" class="AppBundle\Acme"> <argument type="service"> <service class="Symfony\Component\Lock\Lock"> <factory service="lock.foo.factory" method="createLock" /> <argument>my resource</argument> <argument>30</argument> <!-- optional TTL --> </service> </argument> </service> ``` * [x] Tests Commits ------- b4b00c9 [Lock] Include lock component in framework bundle
symfony-splitter
pushed a commit
to symfony/framework-bundle
that referenced
this pull request
Sep 27, 2017
…russe) This PR was squashed before being merged into the 3.4 branch (closes #22113). Discussion ---------- [Lock] Include lock component in framework bundle | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | symfony/symfony-docs#8066 ## Usage use the best available "out of box" store (semaphore if available, filesyste otherwise) ```yml framework: lock: ~ # lock: true ``` ```php $this->get('lock')->acquire(); $this->get('lock.factory')->createLock('my resource')->acquire(); ``` use a specific store ```yml framework: lock: flock # lock: semaphore # lock: redis://localhost # lock: "%env(MEMCACHED_DSN)%" # lock: ["%env(REDIS_DSN_1)%", "%env(REDIS_DSN_2)%"] ``` ```php $this->get('lock')->acquire(); $this->get('lock.factory')->createLock('my resource')->acquire(); ``` use a named lock ```yml framework: lock: foo: flock bar: redis://localhost ``` ```php $this->get('lock.foo')->acquire(); $this->get('lock.bar.factory')->createLock('my resource')->acquire(); ``` factory usage ```xml <service id="acme" class="AppBundle\Acme"> <argument type="service"> <service class="Symfony\Component\Lock\Lock"> <factory service="lock.foo.factory" method="createLock" /> <argument>my resource</argument> <argument>30</argument> <!-- optional TTL --> </service> </argument> </service> ``` * [x] Tests Commits ------- b4b00c9c6f [Lock] Include lock component in framework bundle
xabbuh
reviewed
Jan 2, 2018
|
||
**type**: ``string`` | ||
|
||
The default lock adapter. If not defined the value is set to ``semaphore`` when |
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.
[...] not defined, the value [...]
Thanks Jérémy. |
javiereguiluz
added a commit
that referenced
this pull request
Jan 29, 2018
This PR was merged into the 3.4 branch. Discussion ---------- [Lock] Integrate framework Should probably be merged after #7866 Documentation for symfony/symfony#22113 Commits ------- 142e703 Fixed minor issues 7f1e087 Add lock configuration in framework bundle
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Should probably be merged after #7866
Documentation for symfony/symfony#22113