From 8833f66ff40afa8bbbe508c17336c646f084e85e Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sun, 19 Jan 2025 09:11:53 -0600 Subject: [PATCH] Drop support for league/uri 6.x --- composer.json | 6 +++--- src/Socks5SocketConnector.php | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index d077212..230b49d 100644 --- a/composer.json +++ b/composer.json @@ -36,9 +36,9 @@ "amphp/dns": "^2", "amphp/byte-stream": "^2", "kelunik/certificate": "^1.1", - "league/uri": "^6.5 | ^7", - "league/uri-interfaces": "^2.3 | ^7", - "revolt/event-loop": "^1 || ^0.2" + "league/uri": "^7", + "league/uri-interfaces": "^7", + "revolt/event-loop": "^1" }, "require-dev": { "phpunit/phpunit": "^9", diff --git a/src/Socks5SocketConnector.php b/src/Socks5SocketConnector.php index d0ab447..4620a19 100644 --- a/src/Socks5SocketConnector.php +++ b/src/Socks5SocketConnector.php @@ -77,8 +77,7 @@ public static function tunnel( throw new \Error("Both or neither username and password must be provided!"); } - /** @psalm-suppress DeprecatedMethod */ - $uri = Uri::createFromString($target); + $uri = Uri::new($target); $read = function (int $length) use ($socket, $cancellation): string { \assert($length > 0);