baopham / laravel-dynamodb

Eloquent syntax for DynamoDB
https://packagist.org/packages/baopham/dynamodb
MIT License
484 stars 128 forks source link

feat(docker): add compatibility with dynamodb-local 2.0 #272

Closed crhg closed 12 months ago

crhg commented 12 months ago

The recent 2.0.0 release of dynamodb_local no longer allows non-alphanumeric characters in the credential key as an incompatible change. config/dynamodb.php use the string "dynamodb_local" as the key, but in dynamodb_local 2.0.0, using this string results in an error. This PR solves this problem.

https://hub.docker.com/r/amazon/dynamodb-local

DynamoDB local version 2.0.0 and greater AWS_ACCESS_KEY_ID can contain the only letters (A–Z, a–z) and numbers (0–9).

crhg commented 12 months ago

Thanks for your feedback. The same fix was made for key in DynamoDbTestCase.php.

scrutinizer-notifier commented 12 months ago

The inspection completed: No new issues

crhg commented 12 months ago

I changed the credential key setting in DynamoDbTestCase.php, and the name of the database file that dynamodb-local accesses must be <credential key>_<region>.db, so setUpDatabase() function also needed to modify the name of the destination file to be copied.

Should I also modify the filenames of dynamodb_local_init.db and dynamodb_local_schema.js?

nelson6e65 commented 12 months ago

I'm actually rewriting the tests to use Docker instead. I'll check this. Thanks.

nelson6e65 commented 12 months ago

🚀 v6.4.0