Skip to content
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

[WIP] Adds DynamoDB Adapter #333

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
fix environment
  • Loading branch information
ajwad-shaikh committed Oct 2, 2023
commit f9d13226ddb0bea47d3dac7695d44b5835ba919d
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ services:
- ./phpunit.xml:/usr/src/code/phpunit.xml
ports:
- "8708:8708"
environment:
AWS_ACCESS_KEY_ID: "DUMMYKEYID"
AWS_SECRET_ACCESS_KEY: "DUMMYSECRETKEY"

adminer:
image: adminer
Expand Down
1 change: 0 additions & 1 deletion src/Database/Adapter/DynamoDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ public function delete(string $name): bool
* Get DynamoDb Type
*
* @param string $type
* @param int $size in chars
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Database/Adapter/DynamoDBTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function getDatabase(): Database
$cache = new Cache(new RedisAdapter($redis));

$schema = 'utopiaTests'; // same as $this->testDatabase
$client = new Client(['region' => 'us-west-2', 'version' => 'latest', 'endpoint' => 'http:https://localhost:8012']);
$client = new Client(['region' => 'us-west-2', 'version' => 'latest', 'endpoint' => 'http:https://dynamodb:8012']);

$database = new Database(new DynamoDB($client), $cache);
$database->setDefaultDatabase($schema);
Expand Down