Skip to content

Commit 2c20d9c

Browse files
committed
update: added laravel 12 support
1 parent 0dc9a56 commit 2c20d9c

File tree

3 files changed

+35
-25
lines changed

3 files changed

+35
-25
lines changed

.github/workflows/main.yml

+17-17
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
php: [ 8.2, 8.3, 8.4 ]
12-
laravel: [ 11.0 ]
12+
laravel: [ 11.0, 12.0 ]
1313
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
1717

18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php }}
22+
tools: composer:v2
23+
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd, soap
24+
coverage: none
25+
1826
- name: Get composer cache directory
1927
id: composer-cache
2028
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
@@ -26,14 +34,6 @@ jobs:
2634
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}
2735
restore-keys: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-
2836

29-
- name: Setup PHP
30-
uses: shivammathur/setup-php@v2
31-
with:
32-
php-version: ${{ matrix.php }}
33-
tools: composer:v2
34-
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd, soap
35-
coverage: none
36-
3737
- name: Install dependencies
3838
run: composer require "illuminate/auth:^${{ matrix.laravel }}" "illuminate/config:^${{ matrix.laravel }}" "illuminate/database:^${{ matrix.laravel }}" "illuminate/support:^${{ matrix.laravel }}" "illuminate/translation:^${{ matrix.laravel }}" --prefer-stable --prefer-dist --no-interaction
3939

@@ -47,6 +47,14 @@ jobs:
4747
- name: Checkout
4848
uses: actions/checkout@v4
4949

50+
- name: Setup PHP
51+
uses: shivammathur/setup-php@v2
52+
with:
53+
php-version: '8.2'
54+
tools: composer:v2
55+
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd, soap
56+
coverage: none
57+
5058
- name: Get Composer Cache Directory
5159
id: composer-cache
5260
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
@@ -57,14 +65,6 @@ jobs:
5765
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
5866
restore-keys: ${{ runner.os }}-composer-
5967

60-
- name: Setup PHP
61-
uses: shivammathur/setup-php@v2
62-
with:
63-
php-version: '8.2'
64-
tools: composer:v2
65-
extensions: dom, curl, libxml, mbstring, zip, pcntl, gd, soap
66-
coverage: none
67-
6868
- name: Install dependencies
6969
run: composer install --no-suggest --prefer-dist --no-interaction --optimize-autoloader
7070

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ vendor/
55

66
# phpunit
77
.phpunit.result.cache
8+
.phpunit.cache
89

910
# composer
1011
composer.lock

composer.json

+17-8
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
"require": {
1818
"ext-json": "*",
1919
"php": "^8.2||^8.3||^8.4",
20-
"illuminate/auth": "^11.0",
21-
"illuminate/config": "^11.0",
22-
"illuminate/database": "^11.0",
23-
"illuminate/support": "^11.0",
24-
"illuminate/translation": "^11.0"
20+
"illuminate/auth": "^11.0|^12.0",
21+
"illuminate/config": "^11.0|^12.0",
22+
"illuminate/database": "^11.0|^12.0",
23+
"illuminate/support": "^11.0|^12.0",
24+
"illuminate/translation": "^11.0|^12.0"
2525
},
2626
"require-dev": {
27-
"laravel/pint": "^1.19",
28-
"orchestra/testbench": "^9.5",
29-
"phpunit/phpunit": "^11.2"
27+
"laravel/pint": "1.21",
28+
"orchestra/testbench": "^9.5|^10.0",
29+
"phpunit/phpunit": "^11.5"
3030
},
3131
"autoload": {
3232
"psr-4": {
@@ -47,5 +47,14 @@
4747
"Logger": "Sourcetoad\\Logger\\LoggerFacade"
4848
}
4949
}
50+
},
51+
"scripts": {
52+
"check-code": [
53+
"@lint",
54+
"@test"
55+
],
56+
"lint": "@php vendor/bin/pint --test",
57+
"lint:fix": "@php vendor/bin/pint",
58+
"test": "@php vendor/bin/phpunit"
5059
}
5160
}

0 commit comments

Comments
 (0)