From 1572c2fec2849d272570919e998f9a3c1a5b1703 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Tue, 14 Jan 2025 22:14:11 -0600 Subject: [PATCH] Drop support for league/uri 6.x --- composer.json | 2 +- src/RedisConfig.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 7e1dadc..b9cc17e 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "amphp/sync": "^2", "revolt/event-loop": "^1", "psr/log": "^1|^2|^3", - "league/uri": "^6.5|^7" + "league/uri": "^7" }, "require-dev": { "amphp/phpunit-util": "^3", diff --git a/src/RedisConfig.php b/src/RedisConfig.php index 8202998..53c7377 100644 --- a/src/RedisConfig.php +++ b/src/RedisConfig.php @@ -95,9 +95,7 @@ public function withDatabase(int $database): self private function applyUri(string $uri): void { try { - // Upgrade to new API before supporting league/uri 8.x - /** @psalm-suppress DeprecatedMethod */ - $uri = Uri::createFromString($uri); + $uri = Uri::new($uri); } catch (\Exception) { throw new RedisException('Invalid redis configuration URI: ' . $uri); }