diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 557d263..3c93dae 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -16,7 +16,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' coverage: none - name: Install composer dependencies diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2fc238d..1fcc422 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,9 +2,9 @@ name: run-tests on: push: - branches: [main] + branches: [ main ] pull_request: - branches: [main] + branches: [ main ] jobs: test: @@ -12,13 +12,16 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest] - php: [8.1] - laravel: [9.*] - stability: [prefer-lowest, prefer-stable] + os: [ ubuntu-latest ] + php: [ 8.1, 8.2 ] + laravel: [ 9.* ] + stability: [ prefer-lowest, prefer-stable ] include: - laravel: 9.* testbench: 7.* + exclude: + - php: 8.2 + stability: prefer-lowest name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} @@ -38,6 +41,15 @@ jobs: echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Set Minimum PHP 8.1 Versions + run: | + composer require ramsey/collection:^1.2 brick/math:^0.9.3 --no-interaction --no-update + + - name: Set Minimum PHP 8.2 Versions + run: | + composer require guzzlehttp/guzzle:^7.5 guzzlehttp/psr7:^2.4 predis/predis:^2.0.2 --no-interaction --no-update + if: matrix.php >= 8.2 + - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update diff --git a/tests/RulesTest.php b/tests/RulesTest.php index d362efe..dc63b9e 100644 --- a/tests/RulesTest.php +++ b/tests/RulesTest.php @@ -2,15 +2,18 @@ namespace Soyhuce\PhpstanExtension\Tests; +use Illuminate\Foundation\Testing\Concerns\InteractsWithDeprecationHandling; use Orchestra\Testbench\TestCase as Orchestra; abstract class RulesTest extends Orchestra { use ExecutesLarastan; + use InteractsWithDeprecationHandling; protected function setUp(): void { parent::setUp(); + $this->withoutDeprecationHandling(); $this->configPath = __DIR__ . '/phpstan-tests.neon'; } diff --git a/tests/TestCase.php b/tests/TestCase.php index ecfb5a1..cc52f6c 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,6 +2,7 @@ namespace Soyhuce\PhpstanExtension\Tests; +use Illuminate\Foundation\Testing\Concerns\InteractsWithDeprecationHandling; use Orchestra\Testbench\TestCase as Orchestra; /** @@ -9,4 +10,11 @@ */ class TestCase extends Orchestra { + use InteractsWithDeprecationHandling; + + protected function setUp(): void + { + parent::setUp(); + $this->withoutDeprecationHandling(); + } }