diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 594b3f8a6..febf1deb5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,6 +17,7 @@ jobs: fail-fast: true matrix: stack: [blade, react, vue, api] + laravel: [^9, 10.x-dev] args: [null, --pest] include: - stack: vue @@ -24,7 +25,7 @@ jobs: - stack: react args: --ssr - name: Test Stubs - ${{ matrix.stack }} ${{ matrix.args }} + name: Test Stubs - Laravel ${{ matrix.laravel }} - ${{ matrix.stack }} ${{ matrix.args }} steps: - name: Setup PHP @@ -38,7 +39,7 @@ jobs: - name: Setup Laravel run: | - composer create-project laravel/laravel:^9 . + composer create-project laravel/laravel:${{ matrix.laravel }} . composer require laravel/breeze:* --no-interaction --no-update composer config repositories.breeze '{"type": "path", "url": "breeze"}' --file composer.json diff --git a/composer.json b/composer.json index 3dcd002b3..7f78f7027 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,10 @@ ], "require": { "php": "^8.0.2", - "illuminate/console": "^9.21", - "illuminate/filesystem": "^9.21", - "illuminate/support": "^9.21", - "illuminate/validation": "^9.21" + "illuminate/console": "^9.21|^10.0", + "illuminate/filesystem": "^9.21|^10.0", + "illuminate/support": "^9.21|^10.0", + "illuminate/validation": "^9.21|^10.0" }, "conflict": { "laravel/framework": "<9.37.0" diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index be09ca38b..029ac14e6 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -111,7 +111,7 @@ protected function installMiddlewareAfter($after, $name, $group = 'web') * Installs the given Composer Packages into the application. * * @param mixed $packages - * @return void + * @return bool */ protected function requireComposerPackages($packages) { @@ -126,7 +126,7 @@ protected function requireComposerPackages($packages) is_array($packages) ? $packages : func_get_args() ); - (new Process($command, base_path(), ['COMPOSER_MEMORY_LIMIT' => '-1'])) + return ! (new Process($command, base_path(), ['COMPOSER_MEMORY_LIMIT' => '-1'])) ->setTimeout(null) ->run(function ($type, $output) { $this->output->write($output); diff --git a/src/Console/InstallsInertiaStacks.php b/src/Console/InstallsInertiaStacks.php index d3693e3cc..4cbb00d62 100644 --- a/src/Console/InstallsInertiaStacks.php +++ b/src/Console/InstallsInertiaStacks.php @@ -11,12 +11,14 @@ trait InstallsInertiaStacks /** * Install the Inertia Vue Breeze stack. * - * @return void + * @return int|null */ protected function installInertiaVueStack() { // Install Inertia... - $this->requireComposerPackages('inertiajs/inertia-laravel:^0.6.3', 'laravel/sanctum:^2.8', 'tightenco/ziggy:^1.0'); + if (! $this->requireComposerPackages('inertiajs/inertia-laravel:^0.6.3', 'laravel/sanctum:^3.2', 'tightenco/ziggy:^1.0')) { + return 1; + } // NPM Packages... $this->updateNodePackages(function ($packages) { @@ -136,12 +138,14 @@ protected function installInertiaVueSsrStack() /** * Install the Inertia React Breeze stack. * - * @return void + * @return int|null */ protected function installInertiaReactStack() { // Install Inertia... - $this->requireComposerPackages('inertiajs/inertia-laravel:^0.6.3', 'laravel/sanctum:^2.8', 'tightenco/ziggy:^1.0'); + if (! $this->requireComposerPackages('inertiajs/inertia-laravel:^0.6.3', 'laravel/sanctum:^3.2', 'tightenco/ziggy:^1.0')) { + return 1; + } // NPM Packages... $this->updateNodePackages(function ($packages) {