Skip to content

Commit bb5d21a

Browse files
authored
Merge pull request #46 from laravel-shift/l12-compatibility
Laravel 12.x Compatibility
2 parents a62e6d9 + 5a9e865 commit bb5d21a

File tree

2 files changed

+109
-99
lines changed

2 files changed

+109
-99
lines changed

.github/workflows/run-tests.yml

Lines changed: 103 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,107 @@
11
name: run-tests
22

3-
on: [ push, pull_request ]
3+
on:
4+
- push
5+
- pull_request
46

57
jobs:
6-
psalm:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v2
10-
11-
- name: Setup PHP
12-
uses: shivammathur/setup-php@v2
13-
with:
14-
php-version: '8.0'
15-
coverage: none
16-
17-
- name: Validate composer.json and composer.lock
18-
run: composer validate
19-
20-
- name: Install dependencies
21-
run: composer install --no-progress --no-ansi
22-
23-
- name: Run Psalm
24-
run: composer run-script psalm
25-
26-
tests:
27-
runs-on: ubuntu-latest
28-
strategy:
29-
fail-fast: false
30-
matrix:
31-
php: [ 8.0, 8.1, 8.2, 8.3 ]
32-
laravel: [ 8.*, 9.*, 10.*, 11.* ]
33-
include:
34-
- laravel: 8.*
35-
testbench: 6.*
36-
- laravel: 9.*
37-
testbench: 7.*
38-
- laravel: 10.*
39-
testbench: 8.*
40-
- laravel: 11.*
41-
testbench: 9.*
42-
exclude:
43-
- php: 8.0
44-
laravel: 10.*
45-
- php: 8.0
46-
laravel: 11.*
47-
- php: 8.1
48-
laravel: 11.*
49-
50-
name: Laravel ${{ matrix.laravel }} with PHP ${{ matrix.php }}
51-
52-
steps:
53-
- name: Checkout code
54-
uses: actions/checkout@v2
55-
56-
- name: Setup PHP
57-
uses: shivammathur/setup-php@v2
58-
with:
59-
php-version: ${{ matrix.php }}
60-
coverage: none
61-
62-
- name: Install dependencies
63-
run: |
64-
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
65-
composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update
66-
composer update --prefer-dist --no-interaction
67-
68-
- name: Execute tests
69-
run: composer run-script test
70-
71-
72-
coverage:
73-
name: Coverage
74-
needs: [ tests ]
75-
runs-on: ubuntu-latest
76-
steps:
77-
- uses: actions/checkout@v2
78-
- name: Setup PHP
79-
uses: shivammathur/setup-php@v2
80-
with:
81-
php-version: 8.0
82-
coverage: xdebug
83-
84-
- name: Validate composer.json and composer.lock
85-
run: composer validate
86-
87-
- name: Install dependencies
88-
run: composer install --prefer-dist --no-interaction
89-
90-
- name: Run test suite
91-
uses: paambaati/[email protected]
92-
env:
93-
CC_TEST_REPORTER_ID: ${{ secrets.CC_REPORTER_ID }}
94-
with:
95-
coverageCommand: composer run-script test-coverage
96-
coverageLocations: ${{github.workspace}}/coverage.xml:clover
8+
psalm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '8.0'
17+
coverage: none
18+
19+
- name: Validate composer.json and composer.lock
20+
run: composer validate
21+
22+
- name: Install dependencies
23+
run: composer install --no-progress --no-ansi
24+
25+
- name: Run Psalm
26+
run: composer run-script psalm
27+
28+
tests:
29+
runs-on: ubuntu-latest
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
php: [8.0, 8.1, 8.2, 8.3, 8.4]
34+
laravel: ['8.*', '9.*', '10.*', '11.*', '12.*']
35+
include:
36+
- laravel: 8.*
37+
testbench: 6.*
38+
- laravel: 9.*
39+
testbench: 7.*
40+
- laravel: 10.*
41+
testbench: 8.*
42+
- laravel: 11.*
43+
testbench: 9.*
44+
- laravel: 12.*
45+
testbench: 10.*
46+
exclude:
47+
- php: 8.0
48+
laravel: 10.*
49+
- php: 8.0
50+
laravel: 11.*
51+
- php: 8.0
52+
laravel: 12.*
53+
- php: 8.1
54+
laravel: 11.*
55+
- php: 8.1
56+
laravel: 12.*
57+
- php: 8.4
58+
laravel: 8.*
59+
60+
61+
name: Laravel ${{ matrix.laravel }} with PHP ${{ matrix.php }}
62+
steps:
63+
- name: Checkout code
64+
uses: actions/checkout@v4
65+
66+
- name: Setup PHP
67+
uses: shivammathur/setup-php@v2
68+
with:
69+
php-version: ${{ matrix.php }}
70+
coverage: none
71+
72+
- name: Install dependencies
73+
run: |
74+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
75+
composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update
76+
composer update --prefer-dist --no-interaction
77+
78+
- name: Execute tests
79+
run: composer run-script test
80+
81+
coverage:
82+
name: Coverage
83+
needs:
84+
- tests
85+
runs-on: ubuntu-latest
86+
steps:
87+
- uses: actions/checkout@v4
88+
89+
- name: Setup PHP
90+
uses: shivammathur/setup-php@v2
91+
with:
92+
php-version: 8.0
93+
coverage: xdebug
94+
95+
- name: Validate composer.json and composer.lock
96+
run: composer validate
97+
98+
- name: Install dependencies
99+
run: composer install --prefer-dist --no-interaction
100+
101+
- name: Run test suite
102+
uses: paambaati/codeclimate-action@v9
103+
env:
104+
CC_TEST_REPORTER_ID: ${{ secrets.CC_REPORTER_ID }}
105+
with:
106+
coverageCommand: composer run-script test-coverage
107+
coverageLocations: ${{github.workspace}}/coverage.xml:clover

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,15 @@
2424
"php": "^8.0",
2525
"ext-dom": "*",
2626
"ext-json": "*",
27-
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
28-
"loilo/fuse": "^6.4.6",
27+
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0",
28+
"loilo/fuse": "^6.4.6|^7.1",
2929
"spatie/simple-excel": "^3.0.1",
30-
"spatie/laravel-collection-macros": "^7.12"
30+
"spatie/laravel-collection-macros": "^7.12|^8.0"
3131
},
3232
"require-dev": {
33-
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0",
34-
"pestphp/pest": "^v1.0|^v2.0",
35-
"psalm/plugin-laravel": "^2.0",
36-
"vimeo/psalm": "^5.0"
33+
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0|^10.0",
34+
"pestphp/pest": "^v1.0|^v2.0|^3.7",
35+
"vimeo/psalm": "^5.0|^6.7"
3736
},
3837
"autoload": {
3938
"psr-4": {

0 commit comments

Comments
 (0)