Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 36 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,34 @@ env:

jobs:
test:
name: PHP ${{ matrix.php }}
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
runs-on: ubuntu-latest

strategy:
fail-fast: true
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4", "8.5"]
laravel: ["10.*", "11.*", "12.*", "13.*"]
include:
- laravel: "10.*"
testbench: "8.*"
- laravel: "11.*"
testbench: "9.*"
- laravel: "12.*"
testbench: "10.*"
- laravel: "13.*"
testbench: "11.*"
exclude:
# Laravel 11 and 12 require PHP 8.2+
- php: "8.1"
laravel: "11.*"
- php: "8.1"
laravel: "12.*"
# Laravel 13 requires PHP 8.3+
- php: "8.1"
laravel: "13.*"
- php: "8.2"
laravel: "13.*"

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

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

- name: Run linting
run: composer lint
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
],
"require": {
"php": "^8.1",
"illuminate/console": "^10.0|^11.0|^12.0",
"illuminate/contracts": "^10.0|^11.0|^12.0",
"illuminate/support": "^10.0|^11.0|^12.0"
"illuminate/console": "^10.0|^11.0|^12.0|^13.0",
"illuminate/contracts": "^10.0|^11.0|^12.0|^13.0",
"illuminate/support": "^10.0|^11.0|^12.0|^13.0"
},
"require-dev": {
"orchestra/testbench": "^8.0|^9.0|^10.0",
"orchestra/testbench": "^8.0|^9.0|^10.0|^11.0",
"phpunit/phpunit": "^10.0|^11.0",
"laravel/pint": "^1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion tests/Unit/CommandInspectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ protected function execute($input, $output): int
}
};

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

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