Skip to content

Commit 43e6aef

Browse files
committed
Laravel 12 support
1 parent 60fbb0b commit 43e6aef

File tree

5 files changed

+157
-13
lines changed

5 files changed

+157
-13
lines changed

.github/workflows/analyse.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: analyse
2+
3+
on: ['push', 'pull_request']
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ubuntu-latest]
12+
php: [8.3, 8.4]
13+
laravel: [11.*]
14+
stability: [prefer-stable]
15+
include:
16+
- laravel: 11.*
17+
testbench: 9.*
18+
19+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
30+
coverage: none
31+
32+
- name: Install dependencies
33+
run: |
34+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
35+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
36+
- name: Analyse
37+
run: composer analyse

.github/workflows/changelog.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Update Changelog"
2+
3+
on:
4+
release:
5+
types: [ published, edited, deleted ]
6+
7+
jobs:
8+
generate:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
with:
15+
ref: ${{ github.event.release.target_commitish }}
16+
17+
- name: Generate changelog
18+
uses: justbetter/generate-changelogs-action@main
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
with:
22+
repository: ${{ github.repository }}
23+
24+
- name: Commit CHANGELOG
25+
uses: stefanzweifel/git-auto-commit-action@v4
26+
with:
27+
branch: ${{ github.event.release.target_commitish }}
28+
commit_message: Update CHANGELOG
29+
file_pattern: CHANGELOG.md

.github/workflows/style.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: style
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
style:
9+
name: Style
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: 8.4
20+
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
21+
coverage: none
22+
23+
- name: Install dependencies
24+
run: composer install
25+
26+
- name: Style
27+
run: composer fix-style
28+
29+
- name: Commit Changes
30+
uses: stefanzweifel/git-auto-commit-action@v4
31+
with:
32+
commit_message: Fix styling changes

.github/workflows/tests.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: tests
2+
3+
on: ['push', 'pull_request']
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ubuntu-latest]
12+
php: [8.3, 8.4]
13+
laravel: [11.*]
14+
stability: [prefer-lowest, prefer-stable]
15+
include:
16+
- laravel: 11.*
17+
testbench: 9.*
18+
19+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
30+
coverage: none
31+
32+
- name: Install dependencies
33+
run: |
34+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
35+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
36+
- name: Execute tests
37+
run: composer test

composer.json

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,37 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.2",
20-
"laravel/nova": "^4.0",
21-
"justbetter/laravel-magento-prices": "^2.0",
19+
"php": "^8.3",
20+
"bolechen/nova-activitylog": "^0.5.0",
2221
"justbetter/laravel-magento-async-nova": "^4.0",
23-
"bolechen/nova-activitylog": "^0.4.0"
22+
"justbetter/laravel-magento-prices": "^2.0",
23+
"laravel/framework": "^11.0|^12.0",
24+
"laravel/nova": "^5.0"
2425
},
2526
"require-dev": {
26-
"laravel/pint": "^1.16",
27-
"orchestra/testbench": "^9.1",
28-
"phpunit/phpunit": "^11.2",
29-
"larastan/larastan": "^2.9",
30-
"phpstan/phpstan-mockery": "^1.1"
27+
"larastan/larastan": "^3.0",
28+
"laravel/pint": "^1.20",
29+
"orchestra/testbench": "^9.0",
30+
"pestphp/pest": "^3.7",
31+
"phpstan/phpstan-mockery": "^2.0",
32+
"phpunit/phpunit": "^11.5"
3133
},
3234
"autoload": {
3335
"psr-4": {
3436
"JustBetter\\MagentoPricesNova\\": "src"
3537
}
3638
},
3739
"scripts": {
38-
"analyse": "phpstan",
40+
"analyse": "phpstan --memory-limit=256M",
3941
"style": "pint --test",
4042
"quality": [
43+
"@style",
4144
"@analyse",
42-
"@style"
43-
]
45+
"@test",
46+
"@coverage"
47+
],
48+
"test": "phpunit",
49+
"coverage": "XDEBUG_MODE=coverage php vendor/bin/pest --coverage --min=0"
4450
},
4551
"extra": {
4652
"laravel": {
@@ -50,7 +56,10 @@
5056
}
5157
},
5258
"config": {
53-
"sort-packages": true
59+
"sort-packages": true,
60+
"allow-plugins": {
61+
"pestphp/pest-plugin": true
62+
}
5463
},
5564
"minimum-stability": "stable",
5665
"prefer-stable": true,

0 commit comments

Comments
 (0)