diff --git a/.github/workflows/format_php.yml b/.github/workflows/format_php.yml index 0a9fec3..321c77c 100644 --- a/.github/workflows/format_php.yml +++ b/.github/workflows/format_php.yml @@ -18,13 +18,13 @@ jobs: ref: ${{ github.head_ref }} # mtime needs to be restored for PHP-CS-Fixer cache to work correctly - - name: Restore mtimes - uses: weirdan/git-restore-mtime-action@master + - name: Restore timestamps + uses: chetan/git-restore-mtime-action@v2 - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.4 coverage: none tools: cs2pr env: @@ -43,17 +43,11 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Install composer dependencies -- step 1 - run: 'composer install --working-dir=tools/php-cs-fixer --no-interaction --no-progress --no-scripts' - - - name: Install composer dependencies -- step 2 - run: 'composer install --working-dir=tools/phpcs --no-interaction --no-progress --no-scripts' - - name: Retrieve PHP-CS-Fixer’s cache uses: actions/cache@v4 with: path: .php-cs-fixer.cache - key: ${{ runner.os }}-php-cs-fixer-${{ hashFiles('.php-cs-fixer.php', '.phpcs/**/**') }} + key: ${{ runner.os }}-php-cs-fixer-${{ hashFiles('.php-cs-fixer.php') }} restore-keys: | ${{ runner.os }}-php-cs-fixer- @@ -73,7 +67,7 @@ jobs: - name: Fix detected PHP coding style issues (if any) if: ${{ steps.lint_php.outcome == 'failure' }} id: fix_php - run: composer php:fix + run: composer cs:check continue-on-error: true - name: Commit PHP code-style fixes (if any) 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 b1a8fa7..836f603 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,11 +9,11 @@ jobs: fail-fast: true matrix: php: [ 8.3, 8.2 ] - laravel: [ 10.* ] + laravel: [ 11.* ] dependency-version: [ prefer-stable ] include: - - laravel: 10.* - testbench: 8.* + - laravel: 11.* + testbench: 9.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} @@ -54,14 +54,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 prod diff --git a/composer.json b/composer.json index 7956484..3f9a1d2 100644 --- a/composer.json +++ b/composer.json @@ -12,13 +12,12 @@ ], "require": { "php": "^8.1", - "laravel/nova": "^4.20" + "laravel/nova": "^4.20 || ^5.0" }, "require-dev": { "interaction-design-foundation/coding-standard": "^0.3.0", - "orchestra/testbench": "^8.3", - "phpunit/phpunit": "^10.5 || ^11.0", - "vimeo/psalm": "^5.22" + "orchestra/testbench-core": "^8.30 || ^9.7", + "phpunit/phpunit": "^11.0" }, "repositories": [ { @@ -59,7 +58,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 f6a6c06..5c064bb 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,8 +1,2 @@ - - - - - - - +