Skip to content

Commit

Permalink
Merge pull request #11 from InteractionDesignFoundation/nova-5
Browse files Browse the repository at this point in the history
Support Nova 5
  • Loading branch information
alies-dev authored Dec 15, 2024
2 parents db0e9fc + 983286b commit 196fdcb
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,10 @@ jobs:
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_4_LICENSE_KEY }}"
composer install -n --prefer-dist
- name: Restore timestamps
uses: chetan/git-restore-mtime-action@v2

- run: composer global require cpx/cpx

- name: Run Psalm
run: ./vendor/bin/psalm --shepherd
run: composer psalm -- --shepherd
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_4_LICENSE_KEY }}" --ansi
composer update ${{ matrix.dependency-version }} --prefer-dist --no-interaction --ansi --with="laravel/framework:${{ matrix.laravel }}" --with="orchestra/testbench:${{ matrix.testbench }}"
composer update ${{ matrix.dependency-version }} --prefer-dist --no-interaction --ansi --with="laravel/framework:${{ matrix.laravel }}" --with="orchestra/testbench-core:${{ matrix.testbench }}"
- name: Execute tests
run: composer test
Expand All @@ -46,14 +46,14 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Cache yarn dependencies
uses: actions/cache@v4
id: npm-node_modules-cache
with:
path: node_modules
key: npm-${{ hashFiles('package.json') }}-node-20
key: npm-${{ hashFiles('package.json') }}-node-22

- name: Compile assets
run: npm install && npm run nova:install && npm run prod
12 changes: 7 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"require": {
"php": "^8.1",
"ext-json": "*",
"laravel/nova": "^4.20"
"laravel/nova": "^4.20 || ^5.0"
},
"require-dev": {
"interaction-design-foundation/coding-standard": "^0.3.0",
"orchestra/testbench": "^8.22 || ^9.0",
"interaction-design-foundation/coding-standard": "^0.3",
"orchestra/testbench-core": "^8.30 || ^9.7",
"phpunit/phpunit": "^10.5 || ^11.0",
"vimeo/psalm": "^5.22"
"vimeo/psalm": "^5.26"
},
"repositories": [
{
Expand Down Expand Up @@ -60,7 +60,9 @@
"cs": "@cs:fix",
"cs:check": "phpcs -p -s --colors --report-full --report-summary",
"cs:fix": "phpcbf -p --colors",
"psalm": "vendor/bin/psalm",
"psalm": "cpx psalm",
"sa": "@psalm",
"sa:bl": "cpx psalm --set-baseline=psalm-baseline.xml --long-progress --threads=1",
"test": "phpunit --colors=always"
}
}
7 changes: 1 addition & 6 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.22.2@d768d914152dbbf3486c36398802f74e80cfde48">
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
<file src="src/CardServiceProvider.php">
<UndefinedInterfaceMethod>
<code><![CDATA[routesAreCached]]></code>
Expand All @@ -19,9 +19,4 @@
<code><![CDATA[array{string, array{name: string, time: string, night: bool}}]]></code>
</MoreSpecificReturnType>
</file>
<file src="src/WorldClock.php">
<PropertyNotSetInConstructor>
<code><![CDATA[WorldClock]]></code>
</PropertyNotSetInConstructor>
</file>
</files>
2 changes: 1 addition & 1 deletion src/CardServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Support\ServiceProvider;
use Laravel\Nova\Nova;

class CardServiceProvider extends ServiceProvider
final class CardServiceProvider extends ServiceProvider
{
/** Bootstrap any application services. */
public function boot(): void
Expand Down
2 changes: 1 addition & 1 deletion src/WorldClock.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Laravel\Nova\Card;

class WorldClock extends Card
final class WorldClock extends Card
{
/**
* The width of the card (1/3, 1/2, or full).
Expand Down

0 comments on commit 196fdcb

Please sign in to comment.