diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index a83d708..62adcb2 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -18,6 +18,6 @@ jobs: args: --config=.php-cs-fixer.dist.php --allow-risky=yes - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Fix styling diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 19d6402..3fb6f87 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -3,24 +3,26 @@ name: PHPStan on: push: paths: - - '**.php' - - 'phpstan.neon.dist' + - "**.php" + - "phpstan.neon.dist" + - ".github/workflows/phpstan.yml" jobs: phpstan: name: phpstan runs-on: ubuntu-latest + timeout-minutes: 5 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: "8.4" coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v1 + uses: ramsey/composer-install@v3 - name: Run PHPStan run: ./vendor/bin/phpstan --error-format=github diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 3dee1c3..0ad43d5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,21 +2,27 @@ name: run-tests on: push: - branches: [main] - pull_request: - branches: [main] + paths: + - "**.php" + - ".github/workflows/run-tests.yml" + - "phpunit.xml.dist" + - "composer.json" + - "composer.lock" jobs: test: runs-on: ${{ matrix.os }} + timeout-minutes: 5 strategy: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.2, 8.1, 8.0] - laravel: [11.*, 10.*, 9.*] + php: [8.4, 8.3, 8.2, 8.1, 8.0] + laravel: [12.*, 11.*, 10.*, 9.*] stability: [prefer-lowest, prefer-stable] include: + - laravel: 12.* + testbench: 10.* - laravel: 11.* testbench: 9.* - laravel: 10.* @@ -24,6 +30,10 @@ jobs: - laravel: 9.* testbench: 7.* exclude: + - laravel: 12.* + php: 8.1 + - laravel: 12.* + php: 8.0 - laravel: 11.* php: 8.1 - laravel: 11.* @@ -35,7 +45,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -49,10 +59,18 @@ jobs: echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Fix dependencies + if: ${{ startsWith(matrix.laravel, '9') }} + run: | + composer require "nesbot/carbon:^2.72.6" --no-interaction --no-update + - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction + - name: List Installed Dependencies + run: composer show -D + - name: Execute tests - run: vendor/bin/pest + run: vendor/bin/pest --ci diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index fa56639..39de30d 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -4,13 +4,17 @@ on: release: types: [released] +permissions: + contents: write + jobs: update: runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: main @@ -21,7 +25,7 @@ jobs: release-notes: ${{ github.event.release.body }} - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: branch: main commit_message: Update CHANGELOG diff --git a/composer.json b/composer.json index 2ef26cc..3672ef2 100644 --- a/composer.json +++ b/composer.json @@ -19,21 +19,21 @@ "require": { "php": "^8.0", "doctrine/sql-formatter": "^1.1", - "illuminate/contracts": "^9.33 | ^10.0 | ^11.0", - "illuminate/view": "^9.33 | ^10.0 | ^11.0", + "illuminate/contracts": "^9.33 | ^10.0 | ^11.0 | ^12.0", + "illuminate/view": "^9.33 | ^10.0 | ^11.0 | ^12.0", "spatie/laravel-package-tools": "^1.9.2" }, "require-dev": { - "larastan/larastan": "^2.9", + "larastan/larastan": "^2.9 | ^3.0", "nunomaduro/collision": "^6.0 | ^7.0 | ^8.0", - "orchestra/testbench": "^7.0 | ^8.0 | ^9.0", - "pestphp/pest": "^1.21 | ^2.0", - "pestphp/pest-plugin-laravel": "^1.1 | ^2.0", + "orchestra/testbench": "^7.0 | ^8.0 | ^9.0 | ^10.0", + "pestphp/pest": "^1.21 | ^2.0 | ^3.0", + "pestphp/pest-plugin-laravel": "^1.1 | ^2.0 | ^3.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5 | ^10.0 | ^11.0" + "phpstan/phpstan-deprecation-rules": "^1.0 | ^2.0", + "phpstan/phpstan-phpunit": "^1.0 | ^2.0", + "phpstan/phpstan-strict-rules": "^1.0 | ^2.0", + "phpunit/phpunit": "^9.5.24 | ^10.5 | ^11.5" }, "autoload": { "psr-4": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index b26e85b..f4a34f0 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -9,5 +9,3 @@ parameters: tmpDir: build/phpstan checkOctaneCompatibility: true checkModelProperties: true - checkMissingIterableValueType: true -