Skip to content

Commit 6eb1784

Browse files
Laravel 11.x Compatibility (#30)
* Bump dependencies for Laravel 11 * Update GitHub Actions for Laravel 11 * Fix styling --------- Co-authored-by: laravel-shift <laravel-shift@users.noreply.github.com>
1 parent bd18137 commit 6eb1784

File tree

3 files changed

+64
-55
lines changed

3 files changed

+64
-55
lines changed

.github/workflows/run-tests.yml

Lines changed: 59 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,63 @@
11
name: run-tests
22

3-
on: [push]
3+
on:
4+
- push
45

56
jobs:
6-
test:
7-
8-
runs-on: ubuntu-latest
9-
strategy:
10-
fail-fast: false
11-
matrix:
12-
php: [8.2, 8.1, 8.0, 7.4]
13-
laravel: [10.*, 9.*, 8.*]
14-
dependency-version: [prefer-lowest, prefer-stable]
15-
include:
16-
- laravel: 10.*
17-
testbench: ^8.0
18-
- laravel: 9.*
19-
testbench: ^7.0
20-
- laravel: 8.*
21-
testbench: ^6.23
22-
exclude:
23-
- laravel: 10.*
24-
php: 8.0
25-
- laravel: 10.*
26-
php: 7.4
27-
- laravel: 9.*
28-
php: 7.4
29-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
30-
31-
steps:
32-
- name: Checkout code
33-
uses: actions/checkout@v3
34-
35-
- name: Setup PHP
36-
uses: shivammathur/setup-php@v2
37-
with:
38-
php-version: ${{ matrix.php }}
39-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
40-
coverage: none
41-
42-
- name: Install dependencies
43-
run: |
44-
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.63" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
45-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
46-
47-
- name: Setup Problem Matches
48-
run: |
49-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
50-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
51-
52-
- name: Execute tests
53-
run: vendor/bin/phpunit
7+
test:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php: [8.2, 8.1, 8.0, 7.4]
14+
laravel: ['8.*', '9.*', '10.*', '11.*']
15+
dependency-version: [prefer-lowest, prefer-stable]
16+
include:
17+
- laravel: 10.*
18+
testbench: ^8.0
19+
- laravel: 9.*
20+
testbench: ^7.0
21+
- laravel: 8.*
22+
testbench: ^6.23
23+
- laravel: 11.*
24+
testbench: ^9.0
25+
exclude:
26+
- laravel: 10.*
27+
php: 8.0
28+
- laravel: 10.*
29+
php: 7.4
30+
- laravel: 9.*
31+
php: 7.4
32+
- laravel: 11.*
33+
php: 8.1
34+
- laravel: 11.*
35+
php: 8.0
36+
- laravel: 11.*
37+
php: 7.4
38+
39+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
40+
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v3
44+
45+
- name: Setup PHP
46+
uses: shivammathur/setup-php@v2
47+
with:
48+
php-version: ${{ matrix.php }}
49+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
50+
coverage: none
51+
52+
- name: Install dependencies
53+
run: |
54+
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.63" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
55+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
56+
57+
- name: Setup Problem Matches
58+
run: |
59+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
60+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
61+
62+
- name: Execute tests
63+
run: vendor/bin/phpunit

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
],
1818
"require": {
1919
"php": "^7.4|^8.0",
20-
"illuminate/session": "^8.0|^9.0|^10.0"
20+
"illuminate/session": "^8.0|^9.0|^10.0|^11.0"
2121
},
2222
"require-dev": {
23-
"phpunit/phpunit": "^9.4",
24-
"orchestra/testbench": "^6.23|^7.0|^8.0"
23+
"phpunit/phpunit": "^9.4|^10.5",
24+
"orchestra/testbench": "^6.23|^7.0|^8.0|^9.0"
2525
},
2626
"autoload": {
2727
"psr-4": {
@@ -45,4 +45,4 @@
4545
},
4646
"minimum-stability": "dev",
4747
"prefer-stable": true
48-
}
48+
}

src/helpers.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
use Spatie\Flash\Message;
55

66
/**
7-
* @param string $text
87
* @param string|array $class
98
*/
10-
function flash(string $text = null, $class = null): Flash
9+
function flash(?string $text = null, $class = null): Flash
1110
{
1211
/** @var \Spatie\Flash\Flash $flash */
1312
$flash = app(Flash::class);

0 commit comments

Comments
 (0)