Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit 8d271f0

Browse files
committed
Require Laravel 10 for new projects
1 parent 7761757 commit 8d271f0

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: true
1111
matrix:
1212
php: [8.2, 8.1]
13-
laravel: [10.0]
13+
laravel: [10.2]
1414

1515
name: Unit/Feature Tests - P${{ matrix.php }} - L${{ matrix.laravel }}
1616

composer.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
}
2323
],
2424
"require": {
25-
"php": "^8.0.2",
25+
"php": "^8.1",
2626
"ext-json": "*",
27-
"illuminate/console": "^9.21|^10.0",
28-
"illuminate/support": "^9.21|^10.0",
27+
"illuminate/console": "^9.37|^10.0",
28+
"illuminate/support": "^9.37|^10.0",
2929
"jenssegers/agent": "^2.6",
3030
"laravel/fortify": "^1.15",
31-
"protonemedia/laravel-splade": "^1.3.0"
31+
"protonemedia/laravel-splade": "^1.4.8"
3232
},
3333
"require-dev": {
3434
"inertiajs/inertia-laravel": "^0.6.5",
@@ -40,9 +40,6 @@
4040
"phpstan/phpstan": "^1.10",
4141
"phpunit/phpunit": "^9.3"
4242
},
43-
"conflict": {
44-
"laravel/framework": "<9.37.0"
45-
},
4643
"autoload": {
4744
"psr-4": {
4845
"Laravel\\Jetstream\\": "src/"

src/Console/InstallsSpladeStack.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
use Illuminate\Filesystem\Filesystem;
66
use ProtoneMedia\Splade\Commands\InstallsSpladeExceptionHandler;
77
use ProtoneMedia\Splade\Commands\InstallsSpladeRouteMiddleware;
8-
use Symfony\Component\Process\Process;
8+
use Symfony\Component\Console\Command\Command;
99
use Symfony\Component\Finder\Finder;
10+
use Symfony\Component\Process\Process;
1011

1112
trait InstallsSpladeStack
1213
{
@@ -20,6 +21,13 @@ trait InstallsSpladeStack
2021
*/
2122
protected function installSpladeStack()
2223
{
24+
// Check Laravel version...
25+
if (version_compare(app()->version(), '10.0', '<')) {
26+
$this->error('While you can still use Splade with Laravel 9, new projects should use Laravel 10.');
27+
28+
return Command::FAILURE;
29+
}
30+
2331
$this->replaceInFile('// Features::termsAndPrivacyPolicy(),', 'Features::termsAndPrivacyPolicy(),', config_path('jetstream.php'));
2432
$this->replaceInFile('// Features::profilePhotos(),', 'Features::profilePhotos(),', config_path('jetstream.php'));
2533
$this->replaceInFile("'stack' => 'inertia'", "'stack' => 'splade'", config_path('jetstream.php'));

0 commit comments

Comments
 (0)