Skip to content

Commit 851b6f3

Browse files
authored
Merge pull request #1 from xalunda/laravel12-support
Laravel 12
2 parents d1256e9 + 5cc51e5 commit 851b6f3

File tree

9 files changed

+1291
-1046
lines changed

9 files changed

+1291
-1046
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ indent_style = space
77
end_of_line = lf
88
trim_trailing_whitespace = true
99
insert_final_newline = true
10+
11+
[*.{yml,yaml}]
12+
indent_size = 2
13+
indent_style = space
14+
end_of_line = lf
15+
trim_trailing_whitespace = true
16+
insert_final_newline = true

.github/workflows/bc-check.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ on:
99
- main
1010

1111
jobs:
12-
backwards-compatibility-check:
13-
name: "Backwards Compatibility Check"
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v2
17-
with:
18-
fetch-depth: 0
19-
- name: "Install PHP"
20-
uses: shivammathur/setup-php@v2
21-
with:
22-
php-version: "8.3"
23-
- name: "Install dependencies"
24-
run: "composer install"
25-
- name: "Install BC check"
26-
run: "composer require --dev roave/backward-compatibility-check"
27-
- name: "Check for BC breaks"
28-
run: "vendor/bin/roave-backward-compatibility-check"
12+
backwards-compatibility-check:
13+
name: "Backwards Compatibility Check"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
- name: "Install PHP"
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: "8.3"
23+
- name: "Install dependencies"
24+
run: "composer install"
25+
- name: "Install BC check"
26+
run: "composer require --dev roave/backward-compatibility-check"
27+
- name: "Check for BC breaks"
28+
run: "vendor/bin/roave-backward-compatibility-check"

.github/workflows/phpstan.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,40 @@ on:
88

99
jobs:
1010
larastan:
11-
name: "Running Larastan check"
11+
name: L${{ matrix.laravel }} - Larastan${{ matrix.phpstan }}
1212
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
laravel: ["10.*", "11.*", "12.*"]
16+
include:
17+
- laravel: "10.*"
18+
phpstan: 1
19+
- laravel: "11.*"
20+
phpstan: 2
21+
- laravel: "12.*"
22+
phpstan: 2
23+
1324
steps:
14-
- uses: actions/checkout@v3
25+
- name: Checkout code
26+
uses: actions/checkout@v3
1527

1628
- name: Setup PHP
1729
uses: shivammathur/setup-php@v2
1830
with:
19-
php-version: '8.3'
31+
php-version: "8.3"
2032
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl
2133
coverage: none
2234

2335
- name: Cache composer dependencies
24-
uses: actions/cache@v2
36+
uses: actions/cache@v4
2537
with:
2638
path: vendor
2739
key: composer-${{ hashFiles('composer.lock') }}
2840

2941
- name: Run composer install
30-
run: composer install -n --prefer-dist
42+
run: |
43+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
44+
composer update --prefer-dist --no-interaction
3145
3246
- name: Run phpstan
33-
run: ./vendor/bin/phpstan
47+
run: ./vendor/bin/phpstan --configuration=phpstan${{ matrix.phpstan }}.neon

.github/workflows/pint.yml

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

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

.github/workflows/run-tests.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,23 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest]
1616
php: [8.1, 8.2, 8.3, 8.4]
17-
laravel: ['10.*', '11.*']
17+
laravel: ["10.*", "11.*", "12.*"]
1818
stability: [prefer-lowest, prefer-stable]
1919
include:
2020
- laravel: 10.*
2121
testbench: 8.*
22+
carbon_version: 2.64.1
2223
- laravel: 11.*
2324
testbench: 9.*
25+
carbon_version: 2.64.1
26+
- laravel: 12.*
27+
testbench: 10.*
28+
carbon_version: 3.0.0
2429
exclude:
2530
- laravel: 11.*
2631
php: 8.1
32+
- laravel: 12.*
33+
php: 8.1
2734

2835
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2936

@@ -45,7 +52,7 @@ jobs:
4552
4653
- name: Install dependencies
4754
run: |
48-
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.64.1" --no-interaction --no-update
55+
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^${{ matrix.carbon_version }}" --no-interaction --no-update
4956
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
5057
5158
- name: Execute tests

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.1",
20-
"illuminate/contracts": "^10.0|^11.0",
19+
"php": "^8.1|^8.2|^8.3|^8.4",
20+
"illuminate/contracts": "^10.0|^11.0|^12.0",
2121
"spatie/laravel-package-tools": "^1.12"
2222
},
2323
"require-dev": {
2424
"laravel/pint": "^1.0",
2525
"nunomaduro/collision": "^7.0|^8.0",
26-
"larastan/larastan": "^2.0",
27-
"orchestra/testbench": "^8.0|^9.0",
28-
"phpunit/phpunit": "^9.5|^10.5"
26+
"larastan/larastan": "^2.0|^3.0",
27+
"orchestra/testbench": "^8.0|^9.0|^10.0",
28+
"phpunit/phpunit": "^9.5|^10.5|^11.0"
2929
},
3030
"autoload": {
3131
"psr-4": {

0 commit comments

Comments
 (0)