Skip to content

Support PHP 8.2 #31

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

Merged
merged 2 commits into from
Dec 12, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
php-version: ['7.3', '7.4', '8.0', '8.1']
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"ci-test": "vendor/bin/phpunit --coverage-clover coverage.xml"
},
"require": {
"php": "^7.3|^8.0|^8.1",
"php": "^7.3|^7.4|^8.0|^8.1|^8.2",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
"illuminate/container": "^6.0|^7.0|^8.0|^9.0",
"illuminate/database": "^6.0|^7.0|^8.0|^9.0",
Expand Down
4 changes: 2 additions & 2 deletions tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function it_can_call_client_query()
$client = m::mock(DynamoDbClient::class);
$client->shouldReceive('query')->with([
'TableName' => 'User'
]);
])->once();

$connection = new Connection([]);
$connection->setClient($client);
Expand All @@ -88,7 +88,7 @@ public function it_can_forward_call_to_dynamodb_client()
$client = m::mock(DynamoDbClient::class);
$client->shouldReceive('getItem')->with([
'TableName' => 'User'
]);
])->once();

$connection = new Connection([]);
$connection->setClient($client);
Expand Down
12 changes: 6 additions & 6 deletions tests/Model/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public function it_can_process_all()
]);

$connection = $this->newConnectionMock();
$connection->shouldReceive('scan')->with($params)->andReturn($return);
$connection->shouldReceive('scan')->with($params)->andReturn($return)->once();
$this->setConnectionResolver($connection);

UserA::all();
Expand All @@ -423,7 +423,7 @@ public function it_can_save_new_instance()
];

$connection = $this->newConnectionMock();
$connection->shouldReceive('putItem')->with($params);
$connection->shouldReceive('putItem')->with($params)->once();
$this->setConnectionResolver($connection);

$user = new UserA(['partition' => 'p']);
Expand All @@ -448,7 +448,7 @@ public function it_can_static_create_new_instance()
];

$connection = $this->newConnectionMock();
$connection->shouldReceive('putItem')->with($params);
$connection->shouldReceive('putItem')->with($params)->once();
$this->setConnectionResolver($connection);

UserD::create(['partition' => 'p']);
Expand Down Expand Up @@ -490,7 +490,7 @@ public function it_can_save_existing_instance()
];

$connection = $this->newConnectionMock();
$connection->shouldReceive('updateItem')->with($params)->andReturn($this->sampleAwsResultEmpty());
$connection->shouldReceive('updateItem')->with($params)->andReturn($this->sampleAwsResultEmpty())->once();
$this->setConnectionResolver($connection);

$user = (new UserA)->newFromBuilder(['partition' => 'p']);
Expand Down Expand Up @@ -526,7 +526,7 @@ public function it_can_delete_existing_instance()
];

$connection = $this->newConnectionMock();
$connection->shouldReceive('deleteItem')->with($params);
$connection->shouldReceive('deleteItem')->with($params)->once();
$this->setConnectionResolver($connection);

$user = (new UserA)->newFromBuilder(['partition' => 'p']);
Expand Down Expand Up @@ -575,7 +575,7 @@ public function it_can_call_allowed_builder_method()
'S' => 'p'
]
]
]);
])->once();
$this->setConnectionResolver($connection);

UserA::putItem([
Expand Down
5 changes: 3 additions & 2 deletions tests/Query/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,8 @@ public function it_can_process_process()
$connection = m::mock(Connection::class);
$connection->shouldReceive('scan')
->with(['TableName' => 'Forum'])
->andReturn(new Result(['Items' => []]));
->andReturn(new Result(['Items' => []]))
->once();

$query = new Builder($connection, new Grammar, new Processor);

Expand All @@ -974,7 +975,7 @@ public function it_can_process_process_with_no_processor()
'S' => 'Laravel Thread 1'
]
]
])->andReturn(new Result(['Items' => []]));
])->andReturn(new Result(['Items' => []]))->once();

$query = new Builder($connection, new Grammar, new Processor);

Expand Down