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

Commit c606c47

Browse filesBrowse files
committed
[Lock][WIP] Move DynamoDbStore into its own bridge package
1 parent 11c3b24 commit c606c47
Copy full SHA for c606c47

File tree

Expand file treeCollapse file tree

13 files changed

+147
-4
lines changed
Filter options
Expand file treeCollapse file tree

13 files changed

+147
-4
lines changed
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/Tests export-ignore
2+
/phpunit.xml.dist export-ignore
3+
/.git* export-ignore

‎src/Symfony/Component/Lock/Bridge/DynamoDb/.github/PULL_REQUEST_TEMPLATE.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Bridge/DynamoDb/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Symfony/Component/Lock/Bridge/DynamoDb/.github/workflows/close-pull-request.yml

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Bridge/DynamoDb/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
vendor/
2+
composer.lock
3+
phpunit.xml
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CHANGELOG
2+
=========
3+
4+
7.3
5+
---
6+
7+
* Introduced the Amazon DynamoDb bridge.
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2020-present Fabien Potencier
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Amazon DynamoDb Lock
2+
====================
3+
4+
Provides Amazon DynamoDb integration for Symfony Lock.
5+
6+
Resources
7+
---------
8+
9+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
10+
* [Report issues](https://github.com/symfony/symfony/issues) and
11+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
12+
in the [main Symfony repository](https://github.com/symfony/symfony)

‎src/Symfony/Component/Lock/Store/DynamoDbStore.php renamed to ‎src/Symfony/Component/Lock/Bridge/DynamoDb/Store/DynamoDbStore.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Bridge/DynamoDb/Store/DynamoDbStore.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace Symfony\Component\Lock\Store;
4+
namespace Symfony\Component\Lock\Bridge\DynamoDb\Store;
55

66
use AsyncAws\DynamoDb\DynamoDbClient;
77
use AsyncAws\DynamoDb\Exception\ConditionalCheckFailedException;
@@ -20,6 +20,7 @@
2020
use Symfony\Component\Lock\Exception\LockConflictedException;
2121
use Symfony\Component\Lock\Key;
2222
use Symfony\Component\Lock\PersistingStoreInterface;
23+
use Symfony\Component\Lock\Store\ExpiringStoreTrait;
2324

2425
class DynamoDbStore implements PersistingStoreInterface
2526
{

‎src/Symfony/Component/Lock/Tests/Store/DynamoDbStoreTest.php renamed to ‎src/Symfony/Component/Lock/Bridge/DynamoDb/Tests/Store/DynamoDbStoreTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Bridge/DynamoDb/Tests/Store/DynamoDbStoreTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace Symfony\Component\Lock\Tests\Store;
4+
namespace Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store;
55

66
use Symfony\Component\Lock\PersistingStoreInterface;
77

8-
class DynamoDbStoreTest extends AbstractStoreTestCase
8+
class DynamoDbStoreTest
99
{
1010
protected function getStore(): PersistingStoreInterface
1111
{
+39Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "symfony/amazon-dynamodb-lock",
3+
"type": "symfony-lock-bridge",
4+
"description": "Symfony Amazon DynamoDb extension Lock Bridge",
5+
"keywords": [],
6+
"homepage": "https://symfony.com",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "Fabien Potencier",
11+
"email": "fabien@symfony.com"
12+
},
13+
{
14+
"name": "Symfony Community",
15+
"homepage": "https://symfony.com/contributors"
16+
}
17+
],
18+
"require": {
19+
"php": ">=8.2",
20+
"async-aws/core": "^1.7",
21+
"async-aws/dynamo-db": "^3.0",
22+
"symfony/lock": "^7.3",
23+
"symfony/service-contracts": "^2.5|^3",
24+
"psr/log": "^1|^2|^3"
25+
},
26+
"require-dev": {
27+
"symfony/http-client-contracts": "^2.5|^3"
28+
},
29+
"conflict": {
30+
"symfony/http-client-contracts": "<2.5"
31+
},
32+
"autoload": {
33+
"psr-4": { "Symfony\\Component\\Lock\\Bridge\\DynamoDb\\": "" },
34+
"exclude-from-classmap": [
35+
"/Tests/"
36+
]
37+
},
38+
"minimum-stability": "dev"
39+
}
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.3/phpunit.xsd"
5+
backupGlobals="false"
6+
colors="true"
7+
bootstrap="vendor/autoload.php"
8+
failOnRisky="true"
9+
failOnWarning="true"
10+
>
11+
<php>
12+
<ini name="error_reporting" value="-1" />
13+
</php>
14+
15+
<testsuites>
16+
<testsuite name="Symfony Amazon DynamoDb Lock Component Test Suite">
17+
<directory>./Tests/</directory>
18+
</testsuite>
19+
</testsuites>
20+
21+
<coverage>
22+
<include>
23+
<directory>./</directory>
24+
</include>
25+
<exclude>
26+
<directory>./Tests</directory>
27+
<directory>./vendor</directory>
28+
</exclude>
29+
</coverage>
30+
</phpunit>

‎src/Symfony/Component/Lock/Store/StoreFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Store/StoreFactory.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Doctrine\DBAL\Connection;
1616
use Relay\Relay;
1717
use Symfony\Component\Cache\Adapter\AbstractAdapter;
18+
use Symfony\Component\Lock\Bridge\DynamoDb\Store\DynamoDbStore;
1819
use Symfony\Component\Lock\Exception\InvalidArgumentException;
1920
use Symfony\Component\Lock\PersistingStoreInterface;
2021

‎src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
use PHPUnit\Framework\TestCase;
1717
use Symfony\Component\Cache\Adapter\AbstractAdapter;
1818
use Symfony\Component\Cache\Adapter\MemcachedAdapter;
19+
use Symfony\Component\Lock\Bridge\DynamoDb\Store\DynamoDbStore;
1920
use Symfony\Component\Lock\Store\DoctrineDbalPostgreSqlStore;
2021
use Symfony\Component\Lock\Store\DoctrineDbalStore;
21-
use Symfony\Component\Lock\Store\DynamoDbStore;
2222
use Symfony\Component\Lock\Store\FlockStore;
2323
use Symfony\Component\Lock\Store\InMemoryStore;
2424
use Symfony\Component\Lock\Store\MemcachedStore;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.