Skip to content

Commit 1efa422

Browse files
committed
Upgrade to Laravel 12
1 parent 200e9c6 commit 1efa422

17 files changed

+83
-63
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ trim_trailing_whitespace = true
1212
trim_trailing_whitespace = false
1313

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

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
/testbench.yaml export-ignore
1818
/UPGRADING.md export-ignore
1919
/phpstan.neon.dist export-ignore
20-
/phpstan-baseline.neon export-ignore
20+
/phpstan-baseline.neon export-ignore

.github/workflows/dependabot-auto-merge.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ permissions:
88
jobs:
99
dependabot:
1010
runs-on: ubuntu-latest
11+
timeout-minutes: 5
1112
if: ${{ github.actor == 'dependabot[bot]' }}
1213
steps:
1314

@@ -29,4 +30,4 @@ jobs:
2930
run: gh pr merge --auto --merge "$PR_URL"
3031
env:
3132
PR_URL: ${{github.event.pull_request.html_url}}
32-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
33+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/fix-php-code-style-issues.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ permissions:
1111
jobs:
1212
php-code-styling:
1313
runs-on: ubuntu-latest
14+
timeout-minutes: 5
1415

1516
steps:
1617
- name: Checkout code
1718
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.head_ref }}
1821

1922
- name: Fix PHP code style issues
2023
uses: aglipanci/[email protected]
2124

2225
- name: Commit changes
2326
uses: stefanzweifel/git-auto-commit-action@v5
2427
with:
25-
commit_message: Fix styling
28+
commit_message: Fix styling

.github/workflows/phpstan.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ on:
55
paths:
66
- '**.php'
77
- 'phpstan.neon.dist'
8+
- '.github/workflows/phpstan.yml'
89

910
jobs:
1011
phpstan:
1112
name: phpstan
1213
runs-on: ubuntu-latest
14+
timeout-minutes: 5
1315
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v4
16+
- uses: actions/checkout@v4
1617

1718
- name: Setup PHP
1819
uses: shivammathur/setup-php@v2
1920
with:
20-
php-version: '8.2'
21+
php-version: '8.4'
2122
coverage: none
22-
extensions: sqlite, pdo_sqlite
2323

2424
- name: Install composer dependencies
2525
uses: ramsey/composer-install@v3
2626

2727
- name: Run PHPStan
28-
run: ./vendor/bin/phpstan --error-format=github
28+
run: ./vendor/bin/phpstan --error-format=github

.github/workflows/run-tests.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ jobs:
1616
strategy:
1717
fail-fast: true
1818
matrix:
19-
os: [ ubuntu-latest, windows-latest ]
20-
php: [ 8.3, 8.2 ]
21-
laravel: [ 11.* ]
22-
stability: [ prefer-lowest, prefer-stable ]
19+
os: [ubuntu-latest, windows-latest]
20+
php: [8.4, 8.3]
21+
laravel: [12.*, 11.*]
22+
stability: [prefer-lowest, prefer-stable]
2323
include:
24+
- laravel: 12.*
25+
testbench: 10.*
2426
- laravel: 11.*
2527
testbench: 9.*
26-
carbon: ^3.0
2728

2829
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2930

@@ -45,11 +46,11 @@ jobs:
4546
4647
- name: Install dependencies
4748
run: |
48-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
49+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
4950
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
5051
5152
- name: List Installed Dependencies
5253
run: composer show -D
5354

5455
- name: Execute tests
55-
run: vendor/bin/pest --ci
56+
run: vendor/bin/pest --ci

.github/workflows/update-changelog.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@ name: "Update Changelog"
22

33
on:
44
release:
5-
types: [ released ]
5+
types: [released]
66

77
permissions:
88
contents: write
99

1010
jobs:
1111
update:
1212
runs-on: ubuntu-latest
13+
timeout-minutes: 5
1314

1415
steps:
1516
- name: Checkout code
1617
uses: actions/checkout@v4
18+
with:
19+
ref: main
1720

1821
- name: Update Changelog
1922
uses: stefanzweifel/changelog-updater-action@v1
@@ -26,4 +29,4 @@ jobs:
2629
with:
2730
branch: main
2831
commit_message: Update CHANGELOG
29-
file_pattern: CHANGELOG.md
32+
file_pattern: CHANGELOG.md

.gitignore

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
1-
.idea
2-
.phpunit.cache
3-
build
1+
# Composer Related
42
composer.lock
5-
coverage
6-
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
728
phpunit.xml
829
phpstan.neon
930
testbench.yaml
10-
vendor
11-
node_modules
31+
/docs
32+
/coverage

composer.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@
1515
"role": "Developer"
1616
}
1717
],
18-
"require": {
19-
"php": "^8.2",
20-
"illuminate/contracts": "^11.0",
18+
"require": { "php": "^8.2",
19+
"spatie/laravel-package-tools": "^1.16",
2120
"spatie/laravel-data": "^4.1.0",
22-
"spatie/laravel-package-tools": "^1.14.0"
21+
"illuminate/contracts": "^10.0||^11.0||^12.0"
2322
},
2423
"require-dev": {
25-
"laravel/pint": "^1.13",
26-
"nunomaduro/collision": "^8.1",
27-
"larastan/larastan": "^2.8",
28-
"orchestra/testbench": "^9.0",
29-
"pestphp/pest": "^2.34",
30-
"pestphp/pest-plugin-arch": "^2.5",
31-
"pestphp/pest-plugin-laravel": "^2.3",
32-
"phpstan/extension-installer": "^1.1",
33-
"phpstan/phpstan-deprecation-rules": "^1.0",
34-
"phpstan/phpstan-phpunit": "^1.0"
24+
"laravel/pint": "^1.14",
25+
"nunomaduro/collision": "^8.1.1||^7.10.0",
26+
"larastan/larastan": "^2.9||^3.0",
27+
"orchestra/testbench": "^10.0.0||^9.0.0||^8.22.0",
28+
"pestphp/pest": "^3.0",
29+
"pestphp/pest-plugin-arch": "^3.0",
30+
"pestphp/pest-plugin-laravel": "^3.0",
31+
"phpstan/extension-installer": "^1.3||^2.0",
32+
"phpstan/phpstan-deprecation-rules": "^1.1||^2.0",
33+
"phpstan/phpstan-phpunit": "^1.3||^2.0",
34+
"spatie/laravel-ray": "^1.35"
3535
},
3636
"autoload": {
3737
"psr-4": {
@@ -45,8 +45,9 @@
4545
}
4646
},
4747
"scripts": {
48-
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
49-
"analyse": "vendor/bin/phpstan analyse --memory-limit=2G",
48+
"post-autoload-dump": "@composer run prepare",
49+
"prepare": "@php vendor/bin/testbench package:discover --ansi",
50+
"analyse": "vendor/bin/phpstan analyse",
5051
"test": "vendor/bin/pest",
5152
"test-coverage": "vendor/bin/pest --coverage",
5253
"format": "vendor/bin/pint"

phpstan.neon.dist

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ parameters:
55
level: 5
66
paths:
77
- src
8-
- config
9-
- database
108
tmpDir: build/phpstan
119
checkOctaneCompatibility: true
12-
checkModelProperties: true
13-
checkMissingIterableValueType: false
10+
checkModelProperties: true

0 commit comments

Comments
 (0)