From 662a96fcd2427373ed5befec9c79ea7797899680 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 2 Mar 2024 15:36:32 +0000 Subject: [PATCH 1/3] Bump dependencies for Laravel 11 --- composer.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index b503b70..8b2e7bf 100644 --- a/composer.json +++ b/composer.json @@ -4,13 +4,13 @@ "type": "library", "require": { "php": "^7.3|^8.0", - "laravel/framework": "^7.28|^8.0|^9.0|^10.0", + "laravel/framework": "^7.28|^8.0|^9.0|^10.0|^11.0", "ext-json": "*", "guzzlehttp/guzzle": "^7.2" }, "require-dev": { - "phpunit/phpunit": "^9.3|^9.5", - "orchestra/testbench": "^5.0|^6.0|^7.0", + "phpunit/phpunit": "^9.3|^9.5|^10.5", + "orchestra/testbench": "^5.0|^6.0|^7.0|^9.0", "friendsofphp/php-cs-fixer": "^2.16|^3.1" }, "license": "MIT", @@ -25,7 +25,9 @@ } ], "autoload": { - "files": ["src/helpers.php"], + "files": [ + "src/helpers.php" + ], "psr-4": { "Styde\\Enlighten\\": "src/" } From b7b30567fb7e1dcf4ac9203218863a356510a112 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 2 Mar 2024 15:36:32 +0000 Subject: [PATCH 2/3] Update GitHub Actions for Laravel 11 --- .github/workflows/run-tests.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 79312bc..b6087e9 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,16 +1,19 @@ name: run-tests -on: [push, pull_request] +on: + - push + - pull_request jobs: test: runs-on: ${{ matrix.os }} + strategy: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [7.3, 7.4, 8.0] - laravel: [7.*, 8.*] + php: [7.3, 7.4, 8.0, '8.2'] + laravel: ['7.*', '8.*', '11.*'] dependency-version: [prefer-lowest, prefer-stable] include: - laravel: 7.* @@ -18,6 +21,8 @@ jobs: dependency-version: prefer-stable - laravel: 8.* testbench: 6.* + - laravel: 11.* + testbench: 9.* exclude: - laravel: 7.* dependency-version: prefer-lowest @@ -25,6 +30,12 @@ jobs: php: 8.0 - laravel: 8.* dependency-version: prefer-lowest + - laravel: 11.* + php: 7.3 + - laravel: 11.* + php: 7.4 + - laravel: 11.* + php: 8.0 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} From 2c2b6f3a9782fd6713d3f2965f57c06c4ef563b5 Mon Sep 17 00:00:00 2001 From: laravel-shift Date: Sat, 2 Mar 2024 15:36:52 +0000 Subject: [PATCH 3/3] Apply php-cs-fixer changes --- tests/Integration/ApiDriverTest.php | 100 ++++++++++++++-------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/tests/Integration/ApiDriverTest.php b/tests/Integration/ApiDriverTest.php index 14d3516..357505c 100644 --- a/tests/Integration/ApiDriverTest.php +++ b/tests/Integration/ApiDriverTest.php @@ -63,56 +63,56 @@ function gets_the_list_of_users() $this->assertNull(Run::first(), 'An unexpected run was added to the database when using the API driver'); $this->assertNull(ExampleGroup::first(), 'An unexpected group was added to the database when using the API driver'); $this->assertNull(Example::first(), 'An unexpected group was added to the database when using the API driver'); -// -// tap($group = $run->groups()->first(), function (ExampleGroup $exampleGroup) { -// $this->assertSame('Tests\Integration\ApiDriverTest', $exampleGroup->class_name); -// $this->assertSame('Api Driver', $exampleGroup->title); -// $this->assertSame('integration-api-driver', $exampleGroup->slug); -// $this->assertNull($exampleGroup->description); -// }); + // + // tap($group = $run->groups()->first(), function (ExampleGroup $exampleGroup) { + // $this->assertSame('Tests\Integration\ApiDriverTest', $exampleGroup->class_name); + // $this->assertSame('Api Driver', $exampleGroup->title); + // $this->assertSame('integration-api-driver', $exampleGroup->slug); + // $this->assertNull($exampleGroup->description); + // }); -// tap($group->examples()->first(), function (Example $example) use ($group) { -// $this->assertTrue($example->group->is($group)); -// $this->assertSame('gets_the_list_of_users', $example->method_name); -// $this->assertSame('gets-the-list-of-users', $example->slug); -// $this->assertSame('Obtiene la lista de usuarios', $example->title); -// $this->assertSame('Obtiene los nombres y correos electrónicos de todos los usuarios registrados en el sistema', $example->description); -// -// tap($example->requests->first(), function ($request) { -// $this->assertNotNull($request); -// -// $this->assertSame('GET', $request->request_method); -// $this->assertSame('api/users', $request->request_path); -// -// $this->assertSame('api/users/{status?}/{page?}', $request->route); -// $this->assertSame([ -// [ -// 'name' => 'status', -// 'pattern' => '*', -// 'optional' => true, -// ], -// [ -// 'name' => 'page', -// 'pattern' => '*', -// 'optional' => true, -// ] -// ], $request->route_parameters); -// -// $this->assertFalse($request->follows_redirect); -// -// $this->assertSame([ -// 'data' => [ -// [ -// 'name' => 'Duilio Palacios', -// 'email' => 'duilio@example.com', -// ], -// [ -// 'name' => 'Jeffer Ochoa', -// 'email' => 'jeff.ochoa@example.com', -// ], -// ] -// ], $request->response_body); -// }); -// }); + // tap($group->examples()->first(), function (Example $example) use ($group) { + // $this->assertTrue($example->group->is($group)); + // $this->assertSame('gets_the_list_of_users', $example->method_name); + // $this->assertSame('gets-the-list-of-users', $example->slug); + // $this->assertSame('Obtiene la lista de usuarios', $example->title); + // $this->assertSame('Obtiene los nombres y correos electrónicos de todos los usuarios registrados en el sistema', $example->description); + // + // tap($example->requests->first(), function ($request) { + // $this->assertNotNull($request); + // + // $this->assertSame('GET', $request->request_method); + // $this->assertSame('api/users', $request->request_path); + // + // $this->assertSame('api/users/{status?}/{page?}', $request->route); + // $this->assertSame([ + // [ + // 'name' => 'status', + // 'pattern' => '*', + // 'optional' => true, + // ], + // [ + // 'name' => 'page', + // 'pattern' => '*', + // 'optional' => true, + // ] + // ], $request->route_parameters); + // + // $this->assertFalse($request->follows_redirect); + // + // $this->assertSame([ + // 'data' => [ + // [ + // 'name' => 'Duilio Palacios', + // 'email' => 'duilio@example.com', + // ], + // [ + // 'name' => 'Jeffer Ochoa', + // 'email' => 'jeff.ochoa@example.com', + // ], + // ] + // ], $request->response_body); + // }); + // }); } }