From 2f2e94e8c67a20456adc1fa391da5fe3288c72ee Mon Sep 17 00:00:00 2001 From: Damon Williams Date: Fri, 8 Mar 2019 11:13:05 +0000 Subject: [PATCH 1/4] Updated with changes for laravel 5.8 --- .travis.yml | 3 +-- README.md | 3 ++- composer.json | 5 ++--- src/RawDynamoDbQuery.php | 2 ++ tests/DynamoDb/DynamoDbManagerTest.php | 2 +- tests/DynamoDbClientServiceTest.php | 4 ++-- tests/DynamoDbModelTest.php | 2 +- tests/DynamoDbTestCase.php | 2 +- tests/Parsers/ConditionExpressionTest.php | 2 +- tests/Parsers/UpdateExpressionTest.php | 2 +- 10 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0bfd4b8..0756088 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,9 @@ stages: - test php: - - '5.6' - - '7.0' - '7.1' - '7.2' + - '7.3' before_script: - java -Djava.library.path=./DynamoDBLocal_lib -jar dynamodb_local/DynamoDBLocal.jar --port 3000 & diff --git a/README.md b/README.md index 86a7321..c8fc5ab 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,8 @@ Usage #### find() and delete() ```php -$model->find(); +$model->find($id, array $columns = []); +$model->findMany($ids, array $columns = []); $model->delete(); $model->deleteAsync()->wait(); ``` diff --git a/composer.json b/composer.json index fdc83dc..521d8d2 100644 --- a/composer.json +++ b/composer.json @@ -4,8 +4,8 @@ "keywords": ["laravel", "dynamodb", "aws"], "require": { "aws/aws-sdk-php": "^3.0.0", - "illuminate/support": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* || 5.7.*", - "illuminate/database": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* || 5.7.*" + "illuminate/support": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", + "illuminate/database": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*" }, "license": "MIT", "authors": [ @@ -19,7 +19,6 @@ "BaoPham\\DynamoDb\\": "src/" } }, - "minimum-stability": "dev", "require-dev": { "orchestra/testbench": "~3.0" }, diff --git a/src/RawDynamoDbQuery.php b/src/RawDynamoDbQuery.php index f009a84..3f7705f 100644 --- a/src/RawDynamoDbQuery.php +++ b/src/RawDynamoDbQuery.php @@ -136,6 +136,8 @@ public function count() * For backward compatibility, previously we use array to represent the raw query * * @var array + * + * @return array */ private function internal() { diff --git a/tests/DynamoDb/DynamoDbManagerTest.php b/tests/DynamoDb/DynamoDbManagerTest.php index 9ec6d4c..e4a48c1 100644 --- a/tests/DynamoDb/DynamoDbManagerTest.php +++ b/tests/DynamoDb/DynamoDbManagerTest.php @@ -20,7 +20,7 @@ class DynamoDbManagerTest extends DynamoDbTestCase */ protected $mockedClient; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/DynamoDbClientServiceTest.php b/tests/DynamoDbClientServiceTest.php index 0cae378..3e7b4dc 100644 --- a/tests/DynamoDbClientServiceTest.php +++ b/tests/DynamoDbClientServiceTest.php @@ -13,7 +13,7 @@ */ class DynamoDbClientServiceTest extends TestCase { - public function setUp() + public function setUp(): void { parent::setUp(); @@ -75,7 +75,7 @@ public function testUnsetDynamoDbClientService() /** * Make sure we are not leaving any values set on the DynamoDbModel */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); diff --git a/tests/DynamoDbModelTest.php b/tests/DynamoDbModelTest.php index 645b3e0..32ce202 100644 --- a/tests/DynamoDbModelTest.php +++ b/tests/DynamoDbModelTest.php @@ -21,7 +21,7 @@ abstract class DynamoDbModelTest extends DynamoDbTestCase */ protected $marshaler; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/DynamoDbTestCase.php b/tests/DynamoDbTestCase.php index 0e99f00..f0c0c19 100644 --- a/tests/DynamoDbTestCase.php +++ b/tests/DynamoDbTestCase.php @@ -12,7 +12,7 @@ */ abstract class DynamoDbTestCase extends TestCase { - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Parsers/ConditionExpressionTest.php b/tests/Parsers/ConditionExpressionTest.php index e1e2ad7..aa933f3 100644 --- a/tests/Parsers/ConditionExpressionTest.php +++ b/tests/Parsers/ConditionExpressionTest.php @@ -26,7 +26,7 @@ class ConditionExpressionTest extends TestCase */ private $values; - public function setUp() + public function setUp(): void { parent::setUp(); $this->names = new ExpressionAttributeNames(); diff --git a/tests/Parsers/UpdateExpressionTest.php b/tests/Parsers/UpdateExpressionTest.php index b8b0f27..a536755 100644 --- a/tests/Parsers/UpdateExpressionTest.php +++ b/tests/Parsers/UpdateExpressionTest.php @@ -18,7 +18,7 @@ class UpdateExpressionTest extends TestCase */ private $names; - public function setUp() + public function setUp(): void { parent::setUp(); $this->names = new ExpressionAttributeNames(); From fcf309f359f8c77f2627d7ed2207b76f276993a1 Mon Sep 17 00:00:00 2001 From: Damon Williams Date: Fri, 8 Mar 2019 11:21:28 +0000 Subject: [PATCH 2/4] Updated readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c8fc5ab..cea98bf 100644 --- a/README.md +++ b/README.md @@ -608,3 +608,4 @@ Author and Contributors * [Alexander Ward](https://github.com/cthos) * [Quang Ngo](https://github.com/vanquang9387) * [David Higgins](https://github.com/zoul0813) +* [Damon Williams](https://github.com/footballencarta) From 680dcb9bacdc78b8d114a1b580d2b6dc95231a48 Mon Sep 17 00:00:00 2001 From: Damon Williams Date: Fri, 8 Mar 2019 11:30:40 +0000 Subject: [PATCH 3/4] Added PHP version to composer.json --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 521d8d2..569832b 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,7 @@ "description": "Eloquent syntax for DynamoDB", "keywords": ["laravel", "dynamodb", "aws"], "require": { + "php": "^7.1.3", "aws/aws-sdk-php": "^3.0.0", "illuminate/support": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", "illuminate/database": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*" From 8120ab7eec23d49b6123cadd0494a45043ea6d77 Mon Sep 17 00:00:00 2001 From: footballencarta Date: Fri, 22 Mar 2019 14:36:27 -0400 Subject: [PATCH 4/4] Update composer.json Removed PHP version requirement. --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 569832b..521d8d2 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,6 @@ "description": "Eloquent syntax for DynamoDB", "keywords": ["laravel", "dynamodb", "aws"], "require": { - "php": "^7.1.3", "aws/aws-sdk-php": "^3.0.0", "illuminate/support": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", "illuminate/database": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*"