Skip to content

Commit

Permalink
Merge pull request #31 from kitar/php82
Browse files Browse the repository at this point in the history
Support PHP 8.2
kitar authored Dec 12, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 4cc15a5 + e814bda commit edb21cb
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
4 changes: 2 additions & 2 deletions tests/ConnectionTest.php
Original file line number Diff line number Diff line change
@@ -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);
@@ -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);
12 changes: 6 additions & 6 deletions tests/Model/ModelTest.php
Original file line number Diff line number Diff line change
@@ -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();
@@ -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']);
@@ -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']);
@@ -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']);
@@ -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']);
@@ -575,7 +575,7 @@ public function it_can_call_allowed_builder_method()
'S' => 'p'
]
]
]);
])->once();
$this->setConnectionResolver($connection);

UserA::putItem([
5 changes: 3 additions & 2 deletions tests/Query/BuilderTest.php
Original file line number Diff line number Diff line change
@@ -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);

@@ -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);

0 comments on commit edb21cb

Please sign in to comment.