diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 66a71a9..1489b61 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -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 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 36d3329..f26411f 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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 @@ -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 diff --git a/composer.json b/composer.json index 889a78a..5939b82 100644 --- a/composer.json +++ b/composer.json @@ -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.2.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": [ { @@ -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" } } diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 8b64562..74b8870 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + @@ -19,9 +19,4 @@ - - - - - diff --git a/src/CardServiceProvider.php b/src/CardServiceProvider.php index 7645b70..43c84c5 100644 --- a/src/CardServiceProvider.php +++ b/src/CardServiceProvider.php @@ -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 diff --git a/src/WorldClock.php b/src/WorldClock.php index 115d180..39746a7 100644 --- a/src/WorldClock.php +++ b/src/WorldClock.php @@ -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).