From 4af23b812a02505a7c6e9f46b2318ff204758a7d Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Mon, 24 Feb 2025 02:09:47 +0300 Subject: [PATCH 1/5] Added Laravel 12 support --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 4981408..94af2b5 100644 --- a/composer.json +++ b/composer.json @@ -34,12 +34,12 @@ "require": { "php": "^7.4 || ^8.0", "fig/http-message-util": "^1.1", - "illuminate/routing": "^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0" + "illuminate/routing": "^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0" }, "require-dev": { "dragon-code/extended-routes": "^3.2 || ^4.0", - "orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0", - "phpunit/phpunit": "^9.6 || ^10.0" + "orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", + "phpunit/phpunit": "^9.6 || ^10.0 || ^11.0 || ^12.0" }, "minimum-stability": "stable", "prefer-stable": true, @@ -71,4 +71,4 @@ ] } } -} \ No newline at end of file +} From 079a83e02da73713304d4369e9387b20a9d2ed7c Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Mon, 24 Feb 2025 02:10:52 +0300 Subject: [PATCH 2/5] Update phpunit.yml --- .github/workflows/phpunit.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index c9a14df..83c260a 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -9,8 +9,8 @@ jobs: strategy: fail-fast: true matrix: - php: [ "7.4", "8.0", "8.1", "8.2", "8.3" ] - laravel: [ "7.0", "8.0", "9.0", "10.0", "11.0" ] + php: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ] + laravel: [ "7.0", "8.0", "9.0", "10.0", "11.0", "12.0" ] exclude: - laravel: "7.0" php: "8.1" @@ -21,12 +21,18 @@ jobs: - laravel: "7.0" php: "8.3" + - laravel: "7.0" + php: "8.4" + - laravel: "9.0" php: "7.4" - laravel: "9.0" php: "8.3" + - laravel: "9.0" + php: "8.4" + - laravel: "10.0" php: "7.4" @@ -42,6 +48,15 @@ jobs: - laravel: "11.0" php: "8.1" + - laravel: "12.0" + php: "7.4" + + - laravel: "12.0" + php: "8.0" + + - laravel: "12.0" + php: "8.1" + name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} steps: @@ -58,5 +73,8 @@ jobs: - name: Install dependencies run: composer require --dev laravel/framework:^${{ matrix.laravel }} + - name: Update PHPUnit Configuration + run: vendor/bin/phpunit --migrate-configuration + - name: Execute tests run: sudo vendor/bin/phpunit From 1256de3db99c9df216a1fbd1e05b05587c3fcadb Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Mon, 24 Feb 2025 18:40:12 +0300 Subject: [PATCH 3/5] Update phpunit.yml --- .github/workflows/phpunit.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 83c260a..0e25a46 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -73,8 +73,5 @@ jobs: - name: Install dependencies run: composer require --dev laravel/framework:^${{ matrix.laravel }} - - name: Update PHPUnit Configuration - run: vendor/bin/phpunit --migrate-configuration - - name: Execute tests run: sudo vendor/bin/phpunit From 6697da2b4a31c9d2d02c54ed0668f1d868c7812d Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Mon, 24 Feb 2025 20:25:10 +0300 Subject: [PATCH 4/5] Update phpunit.xml --- phpunit.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index f855540..7008c01 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -17,11 +17,6 @@ ./src - - - - - From b2fca0b261c9915cd81b90ba8dd747b200f42557 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Mon, 24 Feb 2025 20:33:02 +0300 Subject: [PATCH 5/5] Drop `dragon-code/extended-routes` support --- composer.json | 1 - src/Application.php | 18 --------------- tests/Concerns/Routes.php | 3 --- .../RestorableResourceController.php | 12 ---------- tests/Routes/ResourcesTest.php | 12 ---------- tests/TestCase.php | 22 ++++++------------- 6 files changed, 7 insertions(+), 61 deletions(-) delete mode 100644 src/Application.php delete mode 100644 tests/Http/Controllers/RestorableResourceController.php diff --git a/composer.json b/composer.json index 94af2b5..ec6f4e0 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,6 @@ "illuminate/routing": "^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0" }, "require-dev": { - "dragon-code/extended-routes": "^3.2 || ^4.0", "orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", "phpunit/phpunit": "^9.6 || ^10.0 || ^11.0 || ^12.0" }, diff --git a/src/Application.php b/src/Application.php deleted file mode 100644 index b666a3a..0000000 --- a/src/Application.php +++ /dev/null @@ -1,18 +0,0 @@ -register(new EventServiceProvider($this)); - $this->register(new LogServiceProvider($this)); - $this->register(new RoutingServiceProvider($this)); - } -} diff --git a/tests/Concerns/Routes.php b/tests/Concerns/Routes.php index 297cbdc..5b136e0 100644 --- a/tests/Concerns/Routes.php +++ b/tests/Concerns/Routes.php @@ -7,7 +7,6 @@ use Illuminate\Routing\Router; use Tests\Http\Controllers\ApiResourceController; use Tests\Http\Controllers\Controller; -use Tests\Http\Controllers\RestorableResourceController; use Tests\Http\Controllers\WebResourceController; trait Routes @@ -109,8 +108,6 @@ protected function resourceRoutes(Router $router): void $router->resource('resources/photos', WebResourceController::class); $router->apiResource('resources/comments', ApiResourceController::class); - - $router->apiRestorableResource('resources/pages', RestorableResourceController::class); } protected function protectedRoutes(Router $router): void diff --git a/tests/Http/Controllers/RestorableResourceController.php b/tests/Http/Controllers/RestorableResourceController.php deleted file mode 100644 index 4ed7a0a..0000000 --- a/tests/Http/Controllers/RestorableResourceController.php +++ /dev/null @@ -1,12 +0,0 @@ -assertSame('api.resources.comments.update', $this->getRouteName('update', ApiResourceController::class)); $this->assertSame('api.resources.comments.destroy', $this->getRouteName('destroy', ApiResourceController::class)); } - - public function testRestorableApi(): void - { - $this->assertSame('api.resources.pages.index', $this->getRouteName('index', RestorableResourceController::class)); - $this->assertSame('api.resources.pages.store', $this->getRouteName('store', RestorableResourceController::class)); - $this->assertSame('api.resources.pages.trashed', $this->getRouteName('trashed', RestorableResourceController::class)); - $this->assertSame('api.resources.pages.show', $this->getRouteName('show', RestorableResourceController::class)); - $this->assertSame('api.resources.pages.update', $this->getRouteName('update', RestorableResourceController::class)); - $this->assertSame('api.resources.pages.destroy', $this->getRouteName('destroy', RestorableResourceController::class)); - $this->assertSame('api.resources.pages.restore', $this->getRouteName('restore', RestorableResourceController::class)); - } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 9c42b1b..a2a009b 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,4 +1,5 @@ getBasePath()), function ($app) { - $app->bind(LoadConfiguration::class, OrchestraLoadConfiguration::class); - - PackageManifest::swap($app, $this); - }); - } - protected function defineRoutes($router) { $router