Skip to content

Commit

Permalink
[11.x] Supports PHP 8.4 (#1281)
Browse files Browse the repository at this point in the history
* [11.x] Supports PHP 8.4

* Apply fixes from StyleCI

* wip

* wip

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
  • Loading branch information
crynobone and StyleCIBot authored Nov 21, 2024
1 parent 2704954 commit 4a88da6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]
php: [8.2, 8.3, 8.4]
stability: [prefer-lowest, prefer-stable]
exclude:
- php: 8.4
stability: prefer-lowest

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

Expand All @@ -38,4 +41,4 @@ jobs:
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit
run: vendor/bin/phpunit --display-deprecations --fail-on-deprecation
4 changes: 3 additions & 1 deletion .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
php:
preset: laravel
version: 8.1
version: 8.2
enabled:
- nullable_type_declarations
js: true
css: true
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"vlucas/phpdotenv": "^5.4.1"
},
"require-dev": {
"mockery/mockery": "^1.4.4",
"phpunit/phpunit": "10.5.3"
"mockery/mockery": "^1.6.10",
"phpunit/phpunit": "^10.5.35"
},
"suggest": {
"laravel/tinker": "Required to use the tinker console command (^2.7).",
Expand Down
8 changes: 4 additions & 4 deletions src/Testing/Concerns/MakesHttpRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function handle(Request $request)
* @param array|null $data
* @return $this
*/
protected function shouldReturnJson(array $data = null)
protected function shouldReturnJson(?array $data = null)
{
return $this->receiveJson($data);
}
Expand Down Expand Up @@ -239,7 +239,7 @@ public function seeJsonEquals(array $data)
* @param bool $negate
* @return $this
*/
public function seeJson(array $data = null, $negate = false)
public function seeJson(?array $data = null, $negate = false)
{
if (is_null($data)) {
$decodedResponse = json_decode($this->response->getContent(), true);
Expand All @@ -262,7 +262,7 @@ public function seeJson(array $data = null, $negate = false)
* @param array|null $data
* @return $this
*/
public function dontSeeJson(array $data = null)
public function dontSeeJson(?array $data = null)
{
return $this->seeJson($data, true);
}
Expand All @@ -274,7 +274,7 @@ public function dontSeeJson(array $data = null)
* @param array|null $responseData
* @return $this
*/
public function seeJsonStructure(array $structure = null, $responseData = null)
public function seeJsonStructure(?array $structure = null, $responseData = null)
{
$this->response->assertJsonStructure($structure, $responseData);

Expand Down

0 comments on commit 4a88da6

Please sign in to comment.