From 6c6bbd06db3ddd3f4e7e0c97f5b9489c85e4b75f Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 20 Feb 2025 22:43:51 +0800 Subject: [PATCH] Supports Laravel 12 and Inertia.js 2 (#1564) * Supports Laravel 12 Signed-off-by: Mior Muhammad Zaki * Support Inertia.js 2 Signed-off-by: Mior Muhammad Zaki --------- Signed-off-by: Mior Muhammad Zaki --- .github/workflows/tests.yml | 6 +++--- composer.json | 10 +++++----- src/Console/InstallCommand.php | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 29e0f537..434a6bb9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: fail-fast: true matrix: php: [8.2, 8.3, 8.4] - laravel: [11] + laravel: [11, 12] name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} @@ -49,7 +49,7 @@ jobs: fail-fast: true matrix: stack: [inertia, livewire] - laravel: ['11.x-dev'] + laravel: ['11.x-dev', 'dev-master'] name: Test Stubs - Laravel ${{ matrix.laravel }} - ${{ matrix.stack }} @@ -65,7 +65,7 @@ jobs: - name: Setup Laravel run: | - composer create-project laravel/laravel:^${{ matrix.laravel }} . + composer create-project laravel/laravel:${{ matrix.laravel }} . composer require laravel/jetstream:@dev --no-interaction --no-update composer config repositories.jetstream '{"type": "path", "url": "jetstream"}' --file composer.json diff --git a/composer.json b/composer.json index 7e92328e..96be8357 100644 --- a/composer.json +++ b/composer.json @@ -16,20 +16,20 @@ "require": { "php": "^8.2.0", "ext-json": "*", - "illuminate/console": "^11.0", - "illuminate/support": "^11.0", + "illuminate/console": "^11.0|^12.0", + "illuminate/support": "^11.0|^12.0", "laravel/fortify": "^1.20", "mobiledetect/mobiledetectlib": "^4.8.08", "symfony/console": "^7.0" }, "require-dev": { - "inertiajs/inertia-laravel": "^1.0", + "inertiajs/inertia-laravel": "^2.0", "laravel/sanctum": "^4.0", "livewire/livewire": "^3.3", "mockery/mockery": "^1.0", - "orchestra/testbench": "^9.0", + "orchestra/testbench": "^9.0|^10.0", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.4" + "phpunit/phpunit": "^11.0" }, "autoload": { "psr-4": { diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index 64682660..f206d794 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -344,7 +344,7 @@ protected function livewireRouteDefinition() protected function installInertiaStack() { // Install Inertia... - if (! $this->requireComposerPackages('inertiajs/inertia-laravel:^1.0', 'tightenco/ziggy:^2.0')) { + if (! $this->requireComposerPackages('inertiajs/inertia-laravel:^2.0', 'tightenco/ziggy:^2.0')) { return false; } @@ -355,7 +355,7 @@ protected function installInertiaStack() // Install NPM packages... $this->updateNodePackages(function ($packages) { return [ - '@inertiajs/vue3' => '^1.0.14', + '@inertiajs/vue3' => '^2.0', '@tailwindcss/forms' => '^0.5.7', '@tailwindcss/typography' => '^0.5.10', '@vitejs/plugin-vue' => '^5.0.0',