Skip to content

Commit 9a2f484

Browse files
authored
Merge pull request #37 from InteractionDesignFoundation/nova-5
Support Nova 5
2 parents 7aa0ec8 + eaaa631 commit 9a2f484

File tree

5 files changed

+23
-29
lines changed

5 files changed

+23
-29
lines changed

.github/workflows/format_php.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
ref: ${{ github.head_ref }}
1919

2020
# mtime needs to be restored for PHP-CS-Fixer cache to work correctly
21-
- name: Restore mtimes
22-
uses: weirdan/git-restore-mtime-action@master
21+
- name: Restore timestamps
22+
uses: chetan/git-restore-mtime-action@v2
2323

2424
- name: Setup PHP
2525
uses: shivammathur/setup-php@v2
2626
with:
27-
php-version: 8.2
27+
php-version: 8.4
2828
coverage: none
2929
tools: cs2pr
3030
env:
@@ -43,17 +43,11 @@ jobs:
4343
restore-keys: |
4444
${{ runner.os }}-composer-
4545
46-
- name: Install composer dependencies -- step 1
47-
run: 'composer install --working-dir=tools/php-cs-fixer --no-interaction --no-progress --no-scripts'
48-
49-
- name: Install composer dependencies -- step 2
50-
run: 'composer install --working-dir=tools/phpcs --no-interaction --no-progress --no-scripts'
51-
5246
- name: Retrieve PHP-CS-Fixer’s cache
5347
uses: actions/cache@v4
5448
with:
5549
path: .php-cs-fixer.cache
56-
key: ${{ runner.os }}-php-cs-fixer-${{ hashFiles('.php-cs-fixer.php', '.phpcs/**/**') }}
50+
key: ${{ runner.os }}-php-cs-fixer-${{ hashFiles('.php-cs-fixer.php') }}
5751
restore-keys: |
5852
${{ runner.os }}-php-cs-fixer-
5953
@@ -73,7 +67,7 @@ jobs:
7367
- name: Fix detected PHP coding style issues (if any)
7468
if: ${{ steps.lint_php.outcome == 'failure' }}
7569
id: fix_php
76-
run: composer php:fix
70+
run: composer cs:check
7771
continue-on-error: true
7872

7973
- name: Commit PHP code-style fixes (if any)

.github/workflows/psalm.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,10 @@ jobs:
3030
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_4_LICENSE_KEY }}"
3131
composer install -n --prefer-dist
3232
33+
- name: Restore timestamps
34+
uses: chetan/git-restore-mtime-action@v2
35+
36+
- run: composer global require cpx/cpx
37+
3338
- name: Run Psalm
34-
run: ./vendor/bin/psalm --shepherd
39+
run: composer psalm -- --shepherd

.github/workflows/run-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
php: [ 8.3, 8.2 ]
12-
laravel: [ 10.* ]
12+
laravel: [ 11.* ]
1313
dependency-version: [ prefer-stable ]
1414
include:
15-
- laravel: 10.*
16-
testbench: 8.*
15+
- laravel: 11.*
16+
testbench: 9.*
1717

1818
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
1919

@@ -54,14 +54,14 @@ jobs:
5454
- name: Setup Node.js
5555
uses: actions/setup-node@v4
5656
with:
57-
node-version: 20
57+
node-version: 22
5858

5959
- name: Cache yarn dependencies
6060
uses: actions/cache@v4
6161
id: npm-node_modules-cache
6262
with:
6363
path: node_modules
64-
key: npm-${{ hashFiles('package.json') }}-node-20
64+
key: npm-${{ hashFiles('package.json') }}-node-22
6565

6666
- name: Compile assets
6767
run: npm install && npm run prod

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
],
1313
"require": {
1414
"php": "^8.1",
15-
"laravel/nova": "^4.20"
15+
"laravel/nova": "^4.20 || ^5.0"
1616
},
1717
"require-dev": {
1818
"interaction-design-foundation/coding-standard": "^0.3.0",
19-
"orchestra/testbench": "^8.3",
20-
"phpunit/phpunit": "^10.5 || ^11.0",
21-
"vimeo/psalm": "^5.22"
19+
"orchestra/testbench-core": "^8.30 || ^9.7",
20+
"phpunit/phpunit": "^11.0"
2221
},
2322
"repositories": [
2423
{
@@ -59,7 +58,9 @@
5958
"cs": "@cs:fix",
6059
"cs:check": "phpcs -p -s --colors --report-full --report-summary",
6160
"cs:fix": "phpcbf -p --colors",
62-
"psalm": "vendor/bin/psalm",
61+
"psalm": "cpx psalm",
62+
"sa": "@psalm",
63+
"sa:bl": "cpx psalm --set-baseline=psalm-baseline.xml --long-progress --threads=1",
6364
"test": "phpunit --colors=always"
6465
}
6566
}

psalm-baseline.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="5.22.2@d768d914152dbbf3486c36398802f74e80cfde48">
3-
<file src="src/HtmlCard.php">
4-
<PropertyNotSetInConstructor>
5-
<code><![CDATA[HtmlCard]]></code>
6-
</PropertyNotSetInConstructor>
7-
</file>
8-
</files>
2+
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0"/>

0 commit comments

Comments
 (0)