From c870c30d0457787a00d0ea7fe089628c460fb9f3 Mon Sep 17 00:00:00 2001 From: Scott Plunkett Date: Thu, 11 Apr 2024 21:54:42 -0500 Subject: [PATCH 1/8] Update tests.yml --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 140e843..a1e366b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,8 +22,8 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2] - laravel: [10] + php: [8.2, 8.3] + laravel: [10, 11] name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} From bf35e027493ab26a2164942d80e21d4f7a920ad8 Mon Sep 17 00:00:00 2001 From: Scott Plunkett Date: Thu, 11 Apr 2024 21:58:22 -0500 Subject: [PATCH 2/8] Update actions/checkout --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a1e366b..6afe1aa 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 From 9805cf73b0fa7d3544642a660c947d16194805e0 Mon Sep 17 00:00:00 2001 From: Scott Plunkett Date: Thu, 11 Apr 2024 22:01:24 -0500 Subject: [PATCH 3/8] Remove schedule --- .github/workflows/tests.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6afe1aa..bfc1257 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 From 66dd27a9ccd19c39c7d30f86ea08fbc08a4ffa34 Mon Sep 17 00:00:00 2001 From: Scott Plunkett Date: Thu, 11 Apr 2024 22:05:43 -0500 Subject: [PATCH 4/8] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bfc1257..c5e710b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,7 +39,7 @@ jobs: - name: Install dependencies run: | - composer require "illuminate/contracts=^${{ matrix.laravel }}" --dev --no-update + composer require "laravel/framework=^${{ matrix.laravel }}" --dev --no-update composer update --prefer-dist --no-interaction --no-progress - name: Execute tests From 0a0b9cbd0bdfae0595bfe02c2917b0c911b3a65c Mon Sep 17 00:00:00 2001 From: Scott Plunkett Date: Thu, 11 Apr 2024 22:10:28 -0500 Subject: [PATCH 5/8] vary testbench versions --- .github/workflows/tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c5e710b..e5517a1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,8 +21,14 @@ jobs: matrix: 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 @@ -39,7 +45,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework=^${{ 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 From d2de1725e4cbf7345373f0e4429ccabaad7a9100 Mon Sep 17 00:00:00 2001 From: Scott Plunkett Date: Fri, 12 Apr 2024 03:23:07 +0000 Subject: [PATCH 6/8] remove timestamp comparison due to testing delay --- src/Watchers/CacheWatcher.php | 2 +- tests/Watchers/CacheWatcherTest.php | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) 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, ]); }); From 8db9c96eb36cfedf3c05a3bc25c018fca545cd0c Mon Sep 17 00:00:00 2001 From: Scott Plunkett Date: Thu, 11 Apr 2024 22:26:01 -0500 Subject: [PATCH 7/8] Add Laravel 9 --- .github/workflows/tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e5517a1..971028e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,8 +20,11 @@ jobs: fail-fast: true matrix: php: [8.2, 8.3] - laravel: [10, 11] + laravel: [9, 10, 11] include: + - laravel: 9 + php: 8.0 + testbench: 7 - laravel: 10 testbench: 8 - laravel: 11 From 7aa51b000be851ebd2fb508cadcde37e73ddd977 Mon Sep 17 00:00:00 2001 From: Scott Plunkett Date: Thu, 11 Apr 2024 22:27:12 -0500 Subject: [PATCH 8/8] Remove Laravel 9.x from this branch --- .github/workflows/tests.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 971028e..e5517a1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,11 +20,8 @@ jobs: fail-fast: true matrix: php: [8.2, 8.3] - laravel: [9, 10, 11] + laravel: [10, 11] include: - - laravel: 9 - php: 8.0 - testbench: 7 - laravel: 10 testbench: 8 - laravel: 11