Skip to content

Commit 973f889

Browse files
authored
Add Support to Laravel 11 (#4)
1 parent b27f69f commit 973f889

File tree

4 files changed

+68
-66
lines changed

4 files changed

+68
-66
lines changed

.github/workflows/analyze.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: analyze
1+
name: Analyse
22

33
on:
44
push:
@@ -8,30 +8,31 @@ on:
88

99
jobs:
1010
phpstan:
11-
1211
runs-on: ubuntu-latest
1312

1413
steps:
15-
- uses: actions/checkout@v2
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: 8.3
1621

17-
- name: Setup PHP
18-
uses: shivammathur/setup-php@v2
19-
with:
20-
php-version: 8.1
22+
- name: Cache Composer packages
23+
id: composer-cache
24+
uses: actions/cache@v4
25+
with:
26+
path: vendor
27+
key: ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-php-8.3-
2130
22-
- name: Cache Composer packages
23-
id: composer-cache
24-
uses: actions/cache@v2
25-
with:
26-
path: vendor
27-
key: ${{ runner.os }}-php-v28.1-${{ hashFiles('**/composer.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-php-v28.1-
30-
- name: Install dependencies
31-
if: steps.composer-cache.outputs.cache-hit != 'true'
32-
run: |
33-
composer install
34-
composer dump
31+
- name: Install dependencies
32+
if: steps.composer-cache.outputs.cache-hit != 'true'
33+
run: |
34+
composer install --no-interaction --no-progress
35+
composer dump
3536
36-
- name: Run analyse phpstan
37-
run: vendor/bin/phpstan analyse --error-format github
37+
- name: Run analyse phpstan
38+
run: vendor/bin/phpstan analyse --error-format github

.github/workflows/style_fix.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
1-
name: style_fix
1+
name: Style fix
22

33
on:
44
push:
55
branches: [master]
66

77
jobs:
8-
style:
8+
style-fix:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v3
12+
- name: Checkout code
13+
uses: actions/checkout@v4
1314

1415
- name: Setup PHP
1516
uses: shivammathur/setup-php@v2
1617
with:
17-
php-version: 8.1
18+
php-version: 8.3
1819

1920
- name: Cache Composer packages
2021
id: composer-cache
21-
uses: actions/cache@v3
22+
uses: actions/cache@v4
2223
with:
2324
path: vendor
24-
key: ${{ runner.os }}-php-8.1-${{ hashFiles('**/composer.lock') }}
25+
key: ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.json') }}
2526
restore-keys: |
26-
${{ runner.os }}-php-8.1
27+
${{ runner.os }}-php-8.3-
28+
2729
- name: Install dependencies
2830
if: steps.composer-cache.outputs.cache-hit != 'true'
2931
run: |
30-
composer install
32+
composer install --no-interaction --no-progress
3133
composer dump
34+
3235
- name: Fix styles
3336
run: vendor/bin/php-cs-fixer fix
3437

.github/workflows/tests.yml

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: tests
1+
name: Tests
22

33
on:
44
push:
@@ -8,42 +8,40 @@ on:
88

99
jobs:
1010
phpunit:
11-
1211
runs-on: ubuntu-latest
1312

1413
strategy:
14+
fail-fast: true
1515
matrix:
16-
php: [8.0, 8.1]
17-
laravel: [10.*, 9.*]
18-
19-
name: PHP${{ matrix.php }}
16+
php: [8.0, 8.1, 8.2, 8.3]
2017

2118
steps:
22-
- uses: actions/checkout@v2
23-
24-
- name: Setup PHP
25-
uses: shivammathur/setup-php@v2
26-
with:
27-
php-version: ${{ matrix.php }}
28-
extensions: gd
29-
30-
- name: Validate composer.json and composer.lock
31-
run: composer validate
32-
33-
- name: Cache Composer packages
34-
id: composer-cache
35-
uses: actions/cache@v2
36-
with:
37-
path: vendor
38-
key: ${{ runner.os }}-phpv2-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
39-
restore-keys: |
40-
${{ runner.os }}-phpv2-${{ matrix.php }}-
41-
42-
- name: Install dependencies
43-
if: steps.composer-cache.outputs.cache-hit != 'true'
44-
run: |
45-
composer install
46-
composer dump
47-
48-
- name: Run test phpunit
49-
run: composer test
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php }}
26+
extensions: gd
27+
28+
- name: Validate composer.json
29+
run: composer validate
30+
31+
- name: Cache Composer packages
32+
id: composer-cache
33+
uses: actions/cache@v4
34+
with:
35+
path: vendor
36+
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-php-${{ matrix.php }}-
39+
40+
- name: Install dependencies
41+
if: steps.composer-cache.outputs.cache-hit != 'true'
42+
run: |
43+
composer install --no-interaction --no-progress
44+
composer dump
45+
46+
- name: Run test phpunit
47+
run: composer test

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"prefer-stable": true,
2525
"require-dev": {
2626
"friendsofphp/php-cs-fixer": "^3.4",
27-
"phpunit/phpunit": "^9.3",
27+
"phpunit/phpunit": "^9.3|^10.0|^10.5",
2828
"phpstan/phpstan": "^1.2"
2929
},
3030
"autoload": {
@@ -42,4 +42,4 @@
4242
"style": "vendor/bin/php-cs-fixer fix",
4343
"analyse": "vendor/bin/phpstan analyse"
4444
}
45-
}
45+
}

0 commit comments

Comments
 (0)