Skip to content

Commit de36e75

Browse files
authored
Merge pull request #1 from CodeInstinctAI/laravel-13-support
Add Laravel 13 support
2 parents 63eaf21 + ff954f1 commit de36e75

4 files changed

Lines changed: 44 additions & 9 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,34 @@ env:
1313

1414
jobs:
1515
test:
16-
name: PHP ${{ matrix.php }}
16+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
1717
runs-on: ubuntu-latest
1818

1919
strategy:
20-
fail-fast: true
20+
fail-fast: false
2121
matrix:
2222
php: ["8.1", "8.2", "8.3", "8.4", "8.5"]
23+
laravel: ["10.*", "11.*", "12.*", "13.*"]
24+
include:
25+
- laravel: "10.*"
26+
testbench: "8.*"
27+
- laravel: "11.*"
28+
testbench: "9.*"
29+
- laravel: "12.*"
30+
testbench: "10.*"
31+
- laravel: "13.*"
32+
testbench: "11.*"
33+
exclude:
34+
# Laravel 11 and 12 require PHP 8.2+
35+
- php: "8.1"
36+
laravel: "11.*"
37+
- php: "8.1"
38+
laravel: "12.*"
39+
# Laravel 13 requires PHP 8.3+
40+
- php: "8.1"
41+
laravel: "13.*"
42+
- php: "8.2"
43+
laravel: "13.*"
2344

2445
steps:
2546
- name: Checkout code
@@ -32,8 +53,20 @@ jobs:
3253
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
3354
coverage: none
3455

56+
# The committed lock file and the platform pin in composer.json target the
57+
# lowest supported stack (PHP 8.1 / Laravel 10). Drop the pin and resolve
58+
# fresh so each job actually tests its own Laravel version.
59+
#
60+
# --no-security-blocking: end-of-life Laravel releases (10.x, 11.x) carry
61+
# unpatched advisories, which Composer refuses to install by default. That
62+
# only matters for applications; here we just need the framework to test
63+
# against.
3564
- name: Install dependencies
36-
run: composer install --prefer-dist --no-interaction
65+
run: |
66+
composer config --unset platform.php
67+
composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/contracts:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" --no-interaction --no-update
68+
composer require --dev "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
69+
composer update --prefer-dist --no-interaction --no-security-blocking
3770
3871
- name: Run linting
3972
run: composer lint

‎composer.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
],
1313
"require": {
1414
"php": "^8.1",
15-
"illuminate/console": "^10.0|^11.0|^12.0",
16-
"illuminate/contracts": "^10.0|^11.0|^12.0",
17-
"illuminate/support": "^10.0|^11.0|^12.0"
15+
"illuminate/console": "^10.0|^11.0|^12.0|^13.0",
16+
"illuminate/contracts": "^10.0|^11.0|^12.0|^13.0",
17+
"illuminate/support": "^10.0|^11.0|^12.0|^13.0"
1818
},
1919
"require-dev": {
20-
"orchestra/testbench": "^8.0|^9.0|^10.0",
20+
"orchestra/testbench": "^8.0|^9.0|^10.0|^11.0",
2121
"phpunit/phpunit": "^10.0|^11.0",
2222
"laravel/pint": "^1.0"
2323
},

‎composer.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/Unit/CommandInspectorTest.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ protected function execute($input, $output): int
276276
}
277277
};
278278

279-
$application->add($command);
279+
// Application::add() was removed in Symfony Console 8 (Laravel 13);
280+
// setApplication() binds the command on every supported version.
281+
$command->setApplication($application);
280282

281283
$meta = $this->inspector->inspect($command);
282284
$optionNames = array_column($meta['options'], 'name');

0 commit comments

Comments
 (0)