Skip to content

Commit 19a3ce4

Browse files
authored
Merge pull request #135 from thephpleague/fix/guzzle-functions
Remove deprecated Guzzle function call
2 parents 1e7e6be + 03c502c commit 19a3ce4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Signature/EncodesUrl.php

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use GuzzleHttp\Psr7;
66
use GuzzleHttp\Psr7\Uri;
7+
use function GuzzleHttp\Psr7\uri_for;
78
use Psr\Http\Message\UriInterface;
89

910
trait EncodesUrl
@@ -17,6 +18,11 @@ trait EncodesUrl
1718
*/
1819
protected function createUrl($uri)
1920
{
21+
if (method_exists(Psr7\Utils::class, 'uriFor')) {
22+
return Psr7\Utils::uriFor($uri);
23+
}
24+
25+
// Deprecated, removed in Guzzle 7.2
2026
return Psr7\uri_for($uri);
2127
}
2228

0 commit comments

Comments
 (0)