Skip to content

Commit 5eaca39

Browse files
committed
Replace deprecated method call on Psr17FactoryDiscovery
1 parent ea98734 commit 5eaca39

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"php": "^7.1",
2121
"php-http/client-common": "^2.3",
2222
"php-http/cache-plugin": "^1.7",
23-
"php-http/discovery": "^1.9",
23+
"php-http/discovery": "^1.11",
2424
"php-http/httplug": "^2.1",
2525
"php-http/multipart-stream-builder": "^1.1",
2626
"psr/cache": "^1.0",

lib/Github/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function __construct(Builder $httpClientBuilder = null, $apiVersion = nul
122122
$builder->addPlugin(new GithubExceptionThrower());
123123
$builder->addPlugin(new Plugin\HistoryPlugin($this->responseHistory));
124124
$builder->addPlugin(new Plugin\RedirectPlugin());
125-
$builder->addPlugin(new Plugin\AddHostPlugin(Psr17FactoryDiscovery::findUrlFactory()->createUri('https://api.github.com')));
125+
$builder->addPlugin(new Plugin\AddHostPlugin(Psr17FactoryDiscovery::findUriFactory()->createUri('https://api.github.com')));
126126
$builder->addPlugin(new Plugin\HeaderDefaultsPlugin([
127127
'User-Agent' => 'php-github-api (http://github.com/KnpLabs/php-github-api)',
128128
]));
@@ -339,7 +339,7 @@ private function setEnterpriseUrl($enterpriseUrl)
339339
$builder->removePlugin(Plugin\AddHostPlugin::class);
340340
$builder->removePlugin(PathPrepend::class);
341341

342-
$builder->addPlugin(new Plugin\AddHostPlugin(Psr17FactoryDiscovery::findUrlFactory()->createUri($enterpriseUrl)));
342+
$builder->addPlugin(new Plugin\AddHostPlugin(Psr17FactoryDiscovery::findUriFactory()->createUri($enterpriseUrl)));
343343
$builder->addPlugin(new PathPrepend(sprintf('/api/%s', $this->getApiVersion())));
344344
}
345345

0 commit comments

Comments
 (0)