diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 140e843..e5517a1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,10 +4,7 @@ on: push: branches: - main - pull_request: - schedule: - - cron: '0 0 * * *' - + pull_request: {} jobs: tests: runs-on: ubuntu-22.04 @@ -22,14 +19,20 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2] - laravel: [10] + php: [8.2, 8.3] + laravel: [10, 11] + include: + - laravel: 10 + testbench: 8 + - laravel: 11 + testbench: 9 + - name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - Testbench ${{ matrix.testbench }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -42,7 +45,7 @@ jobs: - name: Install dependencies run: | - composer require "illuminate/contracts=^${{ matrix.laravel }}" --dev --no-update + composer require "orchestra/testbench=^${{ matrix.testbench }}" "laravel/framework=^${{ matrix.laravel }}" --dev --no-update composer update --prefer-dist --no-interaction --no-progress - name: Execute tests diff --git a/src/Watchers/CacheWatcher.php b/src/Watchers/CacheWatcher.php index 175d421..ae79554 100644 --- a/src/Watchers/CacheWatcher.php +++ b/src/Watchers/CacheWatcher.php @@ -59,7 +59,7 @@ public function recordCacheSet(KeyWritten $event): void $ttl = property_exists($event, 'minutes') ? $event->minutes * 60 : $event->seconds; - + $this->addEvent('cache set', [ 'key' => $event->key, 'tags' => json_encode($event->tags), diff --git a/tests/Watchers/CacheWatcherTest.php b/tests/Watchers/CacheWatcherTest.php index 0425161..33ae3b1 100644 --- a/tests/Watchers/CacheWatcherTest.php +++ b/tests/Watchers/CacheWatcherTest.php @@ -54,8 +54,6 @@ $fake->assertEventExists('cache set', [ 'key' => 'put', - 'expires_at' => $expiredAt->getTimestamp(), - 'expires_in_seconds' => 60, ]); });