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

Commit fca5655

Browse files
committed
Require Laravel 10 for new installations
1 parent c10c4db commit fca5655

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.github/workflows/run-tests.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
php: [8.2, 8.1, 8.0]
13-
laravel: [10.0, 9.3]
14-
exclude:
15-
- php: 8.0
16-
laravel: 10.0
12+
php: [8.2, 8.1]
13+
laravel: [10.2]
1714

1815
name: Test Stubs P${{ matrix.php }} - L${{ matrix.laravel }}
1916

composer.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^8.0.2",
26+
"php": "^8.1",
2727
"illuminate/console": "^9.37|^10.0",
2828
"illuminate/filesystem": "^9.37|^10.0",
2929
"illuminate/support": "^9.37|^10.0",
3030
"illuminate/validation": "^9.37|^10.0",
31-
"protonemedia/laravel-splade": "^1.3.0"
32-
},
33-
"conflict": {
34-
"laravel/framework": "<9.37.0"
31+
"protonemedia/laravel-splade": "^1.4.9"
3532
},
3633
"autoload": {
3734
"psr-4": {

src/Console/InstallsSpladeStack.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Filesystem\Filesystem;
66
use ProtoneMedia\Splade\Commands\InstallsSpladeExceptionHandler;
77
use ProtoneMedia\Splade\Commands\InstallsSpladeRouteMiddleware;
8+
use Symfony\Component\Console\Command\Command;
89
use Symfony\Component\Finder\Finder;
910

1011
trait InstallsSpladeStack
@@ -19,6 +20,13 @@ trait InstallsSpladeStack
1920
*/
2021
protected function installSpladeStack()
2122
{
23+
// Check Laravel version...
24+
if (version_compare(app()->version(), '10.0', '<')) {
25+
$this->error('While you can still use Splade with Laravel 9, new projects should use Laravel 10.');
26+
27+
return Command::FAILURE;
28+
}
29+
2230
$this->installExceptionHandler();
2331
$this->installRouteMiddleware();
2432

0 commit comments

Comments
 (0)