Skip to content

Commit 7d10557

Browse files
Laravel 11 Support (#47)
* Update dependencies * Update configs * Update CI scripts * `pint` fix * Update composer install for Infection * Bump PHP version * Require Pest 1 for Infection
1 parent e2f3918 commit 7d10557

File tree

14 files changed

+3717
-4195
lines changed

14 files changed

+3717
-4195
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ root = true
22

33
[*]
44
charset = utf-8
5-
indent_size = 4
5+
indent_size = 2
66
indent_style = space
77
end_of_line = lf
88
trim_trailing_whitespace = true

.github/workflows/bc-check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ jobs:
1919
- name: "Install PHP"
2020
uses: shivammathur/setup-php@v2
2121
with:
22-
php-version: "8.1"
22+
php-version: "8.3"
2323
- name: "Install dependencies"
2424
run: "composer install"
25+
- name: "Install BC check"
26+
run: "composer require --dev roave/backward-compatibility-check"
2527
- name: "Check for BC breaks"
2628
run: "vendor/bin/roave-backward-compatibility-check"

.github/workflows/infection.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.1'
19+
php-version: '8.3'
2020
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, fileinfo, sodium
21-
coverage: xdebug
21+
coverage: pcov
2222

2323
- name: Cache composer dependencies
2424
uses: actions/cache@v2
2525
with:
2626
path: vendor
2727
key: composer-${{ hashFiles('composer.lock') }}
2828

29-
- name: Run composer install
30-
run: composer install -n --prefer-dist
29+
- name: Install dependencies
30+
run: |
31+
composer require "laravel/framework:10.*" "pestphp/pest:^1.16" "nesbot/carbon:^2.64.1" --dev --no-interaction --no-update
32+
composer update --prefer-stable --prefer-dist --no-interaction
3133
3234
- name: Run infection
3335
run: ./vendor/bin/infection --show-mutations --min-msi=100 --min-covered-msi=100

.github/workflows/phpstan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.1'
20-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
19+
php-version: '8.3'
20+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl
2121
coverage: none
2222

2323
- name: Cache composer dependencies

.github/workflows/pint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.1'
19+
php-version: '8.3'
2020
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl
2121
coverage: none
2222

.github/workflows/run-tests.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ jobs:
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
os: [ubuntu-latest, windows-latest]
16-
php: [8.0, 8.1, 8.2, 8.3]
17-
laravel: ['10.x', '9.x']
15+
os: [ubuntu-latest]
16+
php: [8.1, 8.2, 8.3]
17+
laravel: ['10.*', '11.*']
1818
stability: [prefer-lowest, prefer-stable]
19+
include:
20+
- laravel: 10.*
21+
testbench: 8.*
22+
- laravel: 11.*
23+
testbench: 9.*
1924
exclude:
20-
- laravel: '10.x'
21-
php: 8.0
25+
- laravel: 11.*
26+
php: 8.1
2227

2328
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2429

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ testbench.yaml
1010
vendor
1111
node_modules
1212
.php-cs-fixer.cache
13+
.phpunit.cache

composer.json

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,21 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.0",
20-
"illuminate/contracts": "^9.33|^10.0",
21-
"illuminate/validation": "^9.33|^10.0",
22-
"michael-rubel/laravel-formatters": "^7.0.6",
19+
"php": "^8.1",
20+
"illuminate/contracts": "^10.0|^11.0",
21+
"illuminate/validation": "^10.0|^11.0",
22+
"michael-rubel/laravel-formatters": "^8.0",
2323
"phpmath/bignumber": "^1.2",
2424
"spatie/laravel-package-tools": "^1.12"
2525
},
2626
"require-dev": {
27-
"infection/infection": "^0.26.7",
28-
"laravel/pint": "^1.2",
29-
"mockery/mockery": "^1.4.4",
30-
"nunomaduro/collision": "^6.0|^7.0",
31-
"nunomaduro/larastan": "^2.2",
32-
"orchestra/testbench": "^7.4|^8.0",
33-
"pestphp/pest": "^1.16",
34-
"phpunit/phpunit": "^9.5|^10.0",
35-
"roave/backward-compatibility-check": "^7.0|^8.0"
27+
"infection/infection": "^0.27.3",
28+
"laravel/pint": "^1.0",
29+
"nunomaduro/collision": "^6.0|^7.0|^8.0",
30+
"larastan/larastan": "^2.0",
31+
"orchestra/testbench": "^8.0|^9.0",
32+
"pestphp/pest": "^1.16|^2.0",
33+
"phpunit/phpunit": "^9.5|^10.5"
3634
},
3735
"autoload": {
3836
"psr-4": {

0 commit comments

Comments
 (0)