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

Updated to run with Laravel 5.8 #194

Merged
merged 4 commits into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ stages:
- test

php:
- '5.6'
- '7.0'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did travis drop support for 5.6 and 7.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, Laravel 5.8 did. PHP 5.6 and PHP 7.0 is EOL and doesn’t receive any updates anymore.

The new void return declarations with Laravel 5.8 will only work with PHP 7.1 and above.

- '7.1'
- '7.2'
- '7.3'

before_script:
- java -Djava.library.path=./DynamoDBLocal_lib -jar dynamodb_local/DynamoDBLocal.jar --port 3000 &
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ Usage
#### find() and delete()

```php
$model->find(<id>);
$model->find($id, array $columns = []);
$model->findMany($ids, array $columns = []);
$model->delete();
$model->deleteAsync()->wait();
```
Expand Down Expand Up @@ -607,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)
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -19,7 +19,6 @@
"BaoPham\\DynamoDb\\": "src/"
}
},
"minimum-stability": "dev",
"require-dev": {
"orchestra/testbench": "~3.0"
},
Expand Down
2 changes: 2 additions & 0 deletions src/RawDynamoDbQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/DynamoDb/DynamoDbManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DynamoDbManagerTest extends DynamoDbTestCase
*/
protected $mockedClient;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
4 changes: 2 additions & 2 deletions tests/DynamoDbClientServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class DynamoDbClientServiceTest extends TestCase
{
public function setUp()
public function setUp(): void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the type returns necessary? Would it be possible to remove these and drop the explicit php 7.1.3 requirement in composer.json? That could get us closer to the broadest range of Laravel compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are required by PHPUnit 8

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For development, I'm ok with the requirement of php7.1 and above.

{
parent::setUp();

Expand Down Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion tests/DynamoDbModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class DynamoDbModelTest extends DynamoDbTestCase
*/
protected $marshaler;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/DynamoDbTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
abstract class DynamoDbTestCase extends TestCase
{
public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/Parsers/ConditionExpressionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ConditionExpressionTest extends TestCase
*/
private $values;

public function setUp()
public function setUp(): void
{
parent::setUp();
$this->names = new ExpressionAttributeNames();
Expand Down
2 changes: 1 addition & 1 deletion tests/Parsers/UpdateExpressionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class UpdateExpressionTest extends TestCase
*/
private $names;

public function setUp()
public function setUp(): void
{
parent::setUp();
$this->names = new ExpressionAttributeNames();
Expand Down