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

Appearance settings

[Lock] DynamoDB store #60138

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

Open
wants to merge 37 commits into
base: 7.4
Choose a base branch
Loading
from
Open
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
11c3b24
[Lock][WIP] Initial pass on DynamoDb lock store
natepage Apr 4, 2025
c606c47
[Lock][WIP] Move DynamoDbStore into its own bridge package
natepage Apr 9, 2025
93677c8
[Lock][WIP] Test DynamoDbStore against local DynamoDB instance in int…
natepage Apr 9, 2025
03acce4
[Lock][WIP] Address some of reviews comments and CS
natepage Apr 9, 2025
0fec459
[Lock][WIP] Fix license headers
natepage Apr 9, 2025
94bccf3
[Lock][WIP] Fix license headers - 1
natepage Apr 9, 2025
4cef875
[Lock][WIP] Psalm InvalidArgument errors are confusing me...
natepage Apr 9, 2025
02b7368
[Lock][WIP] Try to debug package tests failure
natepage Apr 9, 2025
f34fe01
[Lock][WIP] Try to debug package tests failure - 1
natepage Apr 9, 2025
fa6c74d
[Lock][WIP] Fix match case for component_bridge in get-modified-packa…
natepage Apr 9, 2025
ec36e98
[Lock][WIP] Copy AbstractStoreTestCase from Lock component to bridge
natepage Apr 9, 2025
f877628
[Lock][WIP] Disable ssl in integration tests
natepage Apr 9, 2025
f3d2a06
[Lock][WIP] Support sslmode option in DynamoDbStore
natepage Apr 9, 2025
31014f9
[Lock][WIP] Fix createTable input
natepage Apr 9, 2025
ac28237
[Lock][WIP] Ensure microtime return a float
natepage Apr 9, 2025
10579c6
[Lock][WIP] Fix :token attribute value in putOffExpiration
natepage Apr 9, 2025
cd78429
[Lock][WIP] Debug exists function
natepage Apr 9, 2025
0b16e0f
[Lock][WIP] Fix exists logic
natepage Apr 9, 2025
a3c7d91
[Lock][WIP] Try to address psalm error
natepage Apr 9, 2025
6484cfa
[Lock][WIP] Make default region and endpoint options null to use defa…
natepage Apr 10, 2025
abbc213
[Lock][WIP] Move integration tests to Functional dir and add unit tests
natepage Apr 10, 2025
106eeac
[Lock][WIP] Add unit tests with assertEquals for dsn process
natepage Apr 10, 2025
7dfb08a
[Lock][WIP] Default options in case DynamoDbClient instance given
natepage Apr 10, 2025
170bcef
[Lock][WIP] Replicate constructor testing from SQS Connection
natepage Apr 10, 2025
64e7380
[Lock][WIP] Fix default region in tests
natepage Apr 10, 2025
dbb4ae2
[Lock][WIP] Fix invalid and unsupported DSN tests
natepage Apr 10, 2025
c685c71
[Lock] Address review comments
natepage Apr 11, 2025
1ff0a60
[Lock] Make fabbot happy
natepage Apr 11, 2025
fa64c21
[Lock] Address review comments
natepage Apr 17, 2025
f357506
[Lock] Fix RedisStoreTestCase filename
natepage Apr 17, 2025
a0739ce
[Lock] Address review comments
natepage Apr 17, 2025
ff40b91
[Lock] Create DynamoDB table in save if it doesn't exist
natepage May 6, 2025
4f0a780
[Lock] Address review comments
natepage May 7, 2025
37e9888
[Lock] Change $clientOrUrl to $clientOrDsn in DynamoDbStore
natepage Jun 8, 2025
53118f2
[Lock] Fix review comments
natepage Jun 30, 2025
102a490
[Lock] Rename abstract redis store test case
natepage Jun 30, 2025
be2ba6f
[Lock] Change symfony/lock dependency to 7.4 in composer.json
natepage Jun 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 .github/get-modified-packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function getPackageType(string $packageDir): string
return match (true) {
str_contains($packageDir, 'Symfony/Bridge/') => 'bridge',
str_contains($packageDir, 'Symfony/Bundle/') => 'bundle',
preg_match('@Symfony/Component/[^/]+/Bridge/@', $packageDir) => 'component_bridge',
1 === preg_match('@Symfony/Component/[^/]+/Bridge/@', $packageDir) => 'component_bridge',
GromNaN marked this conversation as resolved.
Show resolved Hide resolved
str_contains($packageDir, 'Symfony/Component/') => 'component',
str_contains($packageDir, 'Symfony/Contracts/') => 'contract',
str_ends_with($packageDir, 'Symfony/Contracts') => 'contracts',
Expand Down
3 changes: 2 additions & 1 deletion 3 .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- 8093:8093
- 8094:8094
- 11210:11210
sqs:
aws:
image: localstack/localstack:3.0.2
ports:
- 4566:4566
Expand Down Expand Up @@ -254,6 +254,7 @@ jobs:
run: ./phpunit --group integration -v
env:
INTEGRATION_FTP_URL: 'ftp://test:test@localhost'
LOCK_DYNAMODB_DSN: "dynamodb://localhost:4566/lock_keys?sslmode=disable"
REDIS_HOST: 'localhost:16379'
REDIS_AUTHENTICATED_HOST: 'localhost:16380'
REDIS_CLUSTER_HOSTS: 'localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'
Expand Down
5 changes: 4 additions & 1 deletion 5 .github/workflows/package-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:

- name: Find packages
id: find-packages
run: echo "packages=$(php .github/get-modified-packages.php $(find src/Symfony -mindepth 2 -type f -name composer.json -printf '%h\n' | grep -v src/Symfony/Component/Emoji/Resources/bin |jq -R -s -c 'split("\n")[:-1]') $(git diff --name-only origin/${{ github.base_ref }} HEAD | grep src/ | jq -R -s -c 'split("\n")[:-1]'))" >> $GITHUB_OUTPUT
run: |
all_packages=$(find src/Symfony -mindepth 2 -type f -name composer.json -printf '%h\n' | grep -v src/Symfony/Component/Emoji/Resources/bin |jq -R -s -c 'split("\n")[:-1]')
modified_files=$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep src/ | jq -R -s -c 'split("\n")[:-1]')
echo "packages=$(php .github/get-modified-packages.php $all_packages $modified_files)" >> $GITHUB_OUTPUT

- name: Verify meta files are correct
run: |
Expand Down
1 change: 1 addition & 0 deletions 1 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"require-dev": {
"amphp/http-client": "^4.2.1|^5.0",
"amphp/http-tunnel": "^1.0|^2.0",
"async-aws/dynamo-db": "^3.0",
"async-aws/ses": "^1.0",
"async-aws/sqs": "^1.0|^2.0",
"async-aws/sns": "^1.0",
Expand Down
3 changes: 3 additions & 0 deletions 3 src/Symfony/Component/Lock/Bridge/DynamoDb/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/Tests export-ignore
/phpunit.xml.dist export-ignore
/.git* export-ignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 3 src/Symfony/Component/Lock/Bridge/DynamoDb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor/
composer.lock
phpunit.xml
7 changes: 7 additions & 0 deletions 7 src/Symfony/Component/Lock/Bridge/DynamoDb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CHANGELOG
=========

7.3
natepage marked this conversation as resolved.
Show resolved Hide resolved
---

* Add the bridge
19 changes: 19 additions & 0 deletions 19 src/Symfony/Component/Lock/Bridge/DynamoDb/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2025-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 12 additions & 0 deletions 12 src/Symfony/Component/Lock/Bridge/DynamoDb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Amazon DynamoDB Lock
====================

Provides Amazon DynamoDB integration for Symfony Lock.
natepage marked this conversation as resolved.
Show resolved Hide resolved

Resources
---------

* [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
Loading
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.