diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 50e42fd1..baafb6ad 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,9 +11,9 @@ jobs: os: [ ubuntu-latest ] php: [ 7.4, 8.0, 8.1, 8.2 ] dependency-version: [ prefer-lowest, prefer-stable ] - redis-version: [ 6 ] + redis-version: [ 5, 6, 7 ] - name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} + name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - ${{ matrix.redis-version }} env: # The hostname used to communicate with the Redis service container diff --git a/src/Prometheus/CollectorRegistry.php b/src/Prometheus/CollectorRegistry.php index 3a8ee688..8395c53e 100644 --- a/src/Prometheus/CollectorRegistry.php +++ b/src/Prometheus/CollectorRegistry.php @@ -83,7 +83,7 @@ public function wipeStorage(): void */ public function getMetricFamilySamples(bool $sortMetrics = true): array { - return $this->storageAdapter->collect($sortMetrics); + return $this->storageAdapter->collect($sortMetrics); /** @phpstan-ignore-line */ } /** diff --git a/src/Prometheus/Storage/Redis.php b/src/Prometheus/Storage/Redis.php index f8f67431..3071c8d1 100644 --- a/src/Prometheus/Storage/Redis.php +++ b/src/Prometheus/Storage/Redis.php @@ -123,6 +123,7 @@ public function wipeStorage(): void $this->redis->eval( <<redis->eval( <<redis->getOption(\Redis::OPT_PREFIX) === null) { diff --git a/tests/Test/BlackBoxTest.php b/tests/Test/BlackBoxTest.php index fd451792..5624509c 100644 --- a/tests/Test/BlackBoxTest.php +++ b/tests/Test/BlackBoxTest.php @@ -45,7 +45,7 @@ public function gaugesShouldBeOverwritten(): void ]; - Promise\settle($promises)->wait(); + Promise\Utils::settle($promises)->wait(); $end = microtime(true); echo "\ntime: " . ($end - $start) . "\n"; @@ -84,7 +84,7 @@ public function countersShouldIncrementAtomically($increment): void $n += $increment; } - Promise\settle($promises)->wait(); + Promise\Utils::settle($promises)->wait(); $end = microtime(true); echo "\ntime: " . ($end - $start) . "\n"; @@ -124,7 +124,7 @@ public function histogramsShouldIncrementAtomically(): void $this->client->getAsync('/examples/some_histogram.php?c=9&adapter=' . $this->adapter), ]; - Promise\settle($promises)->wait(); + Promise\Utils::settle($promises)->wait(); $end = microtime(true); echo "\ntime: " . ($end - $start) . "\n"; @@ -168,7 +168,7 @@ public function summariesShouldIncrementAtomically(): void $this->client->getAsync('/examples/some_summary.php?c=10&adapter=' . $this->adapter), ]; - Promise\settle($promises)->wait(); + Promise\Utils::settle($promises)->wait(); $end = microtime(true); echo "\ntime: " . ($end - $start) . "\n";