Skip to content

Commit 96733e8

Browse files
ADD Laravel 12 support (#37)
* ADD laravel 12 e php 8.4 support
1 parent a621e2d commit 96733e8

24 files changed

+300
-417
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ root = true
22

33
[*]
44
charset = utf-8
5+
end_of_line = lf
56
indent_size = 4
67
indent_style = space
7-
end_of_line = lf
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

1111
[*.md]
1212
trim_trailing_whitespace = false
1313

1414
[*.{yml,yaml}]
15-
indent_size = 2
15+
indent_size = 2

.gitattributes

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@
66
/.gitattributes export-ignore
77
/.gitignore export-ignore
88
/phpunit.xml.dist export-ignore
9+
/art export-ignore
10+
/docs export-ignore
911
/tests export-ignore
12+
/workbench export-ignore
1013
/.editorconfig export-ignore
11-
/.php_cs.dist export-ignore
14+
/.php_cs.dist.php export-ignore
1215
/psalm.xml export-ignore
1316
/psalm.xml.dist export-ignore
17+
/testbench.yaml export-ignore
18+
/UPGRADING.md export-ignore
19+
/phpstan.neon.dist export-ignore
20+
/phpstan-baseline.neon export-ignore
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Fix PHP code style issues
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
php-code-styling:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v5
19+
with:
20+
ref: ${{ github.head_ref }}
21+
22+
- name: Fix PHP code style issues
23+
uses: aglipanci/laravel-pint-action@2.6
24+
25+
- name: Commit changes
26+
uses: stefanzweifel/git-auto-commit-action@v6
27+
with:
28+
commit_message: Fix styling

.github/workflows/php-cs-fixer.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/phpstan.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'phpstan.neon.dist'
8+
- '.github/workflows/phpstan.yml'
9+
10+
jobs:
11+
phpstan:
12+
name: phpstan
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
steps:
16+
- uses: actions/checkout@v5
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.2'
22+
coverage: none
23+
24+
- name: Install composer dependencies
25+
uses: ramsey/composer-install@v3
26+
27+
- name: Run PHPStan
28+
run: ./vendor/bin/phpstan --error-format=github

.github/workflows/psalm.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/run-tests.yml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,39 @@ name: run-tests
22

33
on:
44
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
5+
paths:
6+
- '**.php'
7+
- '.github/workflows/run-tests.yml'
8+
- 'phpunit.xml.dist'
9+
- 'composer.json'
10+
- 'composer.lock'
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
815

916
jobs:
1017
test:
1118
runs-on: ${{ matrix.os }}
19+
timeout-minutes: 5
1220
strategy:
1321
fail-fast: true
1422
matrix:
1523
os: [ubuntu-latest, windows-latest]
16-
php: [8.3, 8.2, 8.1, 8.0]
17-
laravel: [11.*, 10.*, 9.*]
24+
php: [8.4, 8.3, 8.2]
25+
laravel: [12.*, 11.*]
1826
stability: [prefer-lowest, prefer-stable]
1927
include:
28+
- laravel: 12.*
29+
testbench: 10.*
2030
- laravel: 11.*
2131
testbench: 9.*
22-
carbon: ^3.0
23-
- laravel: 10.*
24-
testbench: 8.*
25-
carbon: ^2.63
26-
- laravel: 9.*
27-
testbench: 7.*
28-
carbon: ^2.63
29-
exclude:
30-
- laravel: 10.*
31-
php: 8.0
32-
- laravel: 11.*
33-
php: 8.1
34-
- laravel: 11.*
35-
php: 8.0
3632

3733
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3834

3935
steps:
4036
- name: Checkout code
41-
uses: actions/checkout@v4
37+
uses: actions/checkout@v5
4238

4339
- name: Setup PHP
4440
uses: shivammathur/setup-php@v2
@@ -54,8 +50,11 @@ jobs:
5450
5551
- name: Install dependencies
5652
run: |
57-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
53+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
5854
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
5955
56+
- name: List Installed Dependencies
57+
run: composer show -D
58+
6059
- name: Execute tests
61-
run: vendor/bin/phpunit
60+
run: vendor/bin/pest --ci

.gitignore

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
1-
.idea
2-
.php_cs
3-
.php_cs.cache
4-
.phpunit.result.cache
5-
build
1+
# Composer Related
62
composer.lock
7-
coverage
8-
docs
3+
/vendor
4+
5+
# Frontend Assets
6+
/node_modules
7+
8+
# Logs
9+
npm-debug.log
10+
yarn-error.log
11+
12+
# Caches
13+
.phpunit.cache
14+
.phpunit.result.cache
15+
/build
16+
17+
# IDE Helper
18+
_ide_helper.php
19+
_ide_helper_models.php
20+
.phpstorm.meta.php
21+
22+
# Editors
23+
/.idea
24+
/.fleet
25+
/.vscode
26+
27+
# Misc
928
phpunit.xml
10-
psalm.xml
29+
phpstan.neon
1130
testbench.yaml
12-
vendor
13-
node_modules
14-
.php-cs-fixer.cache
15-
.phpunit.cache/test-results
31+
/docs
32+
/coverage

.php-cs-fixer.dist.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

composer.json

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,21 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^8.0",
26+
"php": "^8.2",
2727
"ext-openssl": "*",
28-
"illuminate/contracts": "^9.0|^10.0|^11.0",
29-
"illuminate/database": "^9.0|^10.0|^11.0",
30-
"illuminate/support": "^9.0|^10.0|^11.0",
31-
"illuminate/validation": "^9.0|^10.0|^11.0",
28+
"illuminate/contracts": "^11.0|^12.0",
29+
"illuminate/database": "^11.0|^12.0",
30+
"illuminate/support": "^11.0|^12.0",
31+
"illuminate/validation": "^11.0|^12.0",
3232
"spatie/laravel-package-tools": "^1.14.1"
3333
},
3434
"require-dev": {
35-
"friendsofphp/php-cs-fixer": "^3.4",
36-
"orchestra/testbench": "^7.0|^8.0|^9.0",
37-
"phpunit/phpunit": "^9.5|^10.5",
38-
"vimeo/psalm": "^4.20|^5.22"
35+
"larastan/larastan": "^3.7",
36+
"laravel/pint": "^1.25",
37+
"orchestra/testbench": "^9.0|^10.0",
38+
"pestphp/pest": "^3.8",
39+
"pestphp/pest-plugin-laravel": "^3.2",
40+
"phpunit/phpunit": "^10.5|^11.0"
3941
},
4042
"autoload": {
4143
"psr-4": {
@@ -48,13 +50,16 @@
4850
}
4951
},
5052
"scripts": {
51-
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
52-
"psalm": "vendor/bin/psalm",
53-
"test": "vendor/bin/phpunit --colors=always",
54-
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
53+
"format": "vendor/bin/pint",
54+
"analyse": "vendor/bin/phpstan analyse",
55+
"test": "vendor/bin/pest",
56+
"test-coverage": "vendor/bin/pest --coverage"
5557
},
5658
"config": {
57-
"sort-packages": true
59+
"sort-packages": true,
60+
"allow-plugins": {
61+
"pestphp/pest-plugin": true
62+
}
5863
},
5964
"extra": {
6065
"laravel": {

0 commit comments

Comments
 (0)