@@ -210,8 +210,8 @@ $client = new Redmine\Client\NativeCurlClient('https://redmine.example.com', '12
210210The ` Psr18Client ` requires
211211
212212- a ` Psr\Http\Client\ClientInterface ` implementation (like guzzlehttp/guzzle), [ see] ( https://packagist.org/providers/psr/http-client-implementation )
213- - a ` Psr\Http\Message\ServerRequestFactoryInterface ` implementation (like nyholm /psr7), [ see] ( https://packagist.org/providers/psr/http-factory-implementation )
214- - a ` Psr\Http\Message\StreamFactoryInterface ` implementation (like nyholm /psr7), [ see] ( https://packagist.org/providers/psr/http-message-implementation )
213+ - a ` Psr\Http\Message\ServerRequestFactoryInterface ` implementation (like guzzlehttp /psr7), [ see] ( https://packagist.org/providers/psr/http-factory-implementation )
214+ - a ` Psr\Http\Message\StreamFactoryInterface ` implementation (like guzzlehttp /psr7), [ see] ( https://packagist.org/providers/psr/http-message-implementation )
215215- a URL to your Redmine instance
216216- an Apikey or username
217217- and optional a password if you want tu use username/password.
@@ -223,13 +223,26 @@ The `Psr18Client` requires
223223
224224require_once 'vendor/autoload.php';
225225+
226- + $guzzle = \GuzzleHttp\Client();
227- + $psr17Factory = new \Nyholm \Psr7\Factory\Psr17Factory ();
226+ + $guzzle = new \GuzzleHttp\Client();
227+ + $psr17Factory = new \GuzzleHttp \Psr7\HttpFactory ();
228228+
229229+ // Instantiate with ApiKey
230- + $client = new \Redmine\Client\Prs18Client($guzzle, $psr17Factory, $psr17Factory, 'https://redmine.example.com', '1234567890abcdfgh');
230+ + $client = new \Redmine\Client\Psr18Client(
231+ + $guzzle,
232+ + $psr17Factory,
233+ + $psr17Factory,
234+ + 'https://redmine.example.com',
235+ + '1234567890abcdfgh'
236+ + );
231237+ // ...or Instantiate with Username/Password (not recommended)
232- + $client = new \Redmine\Client\Prs18Client($guzzle, $psr17Factory, $psr17Factory, 'https://redmine.example.com', 'username', 'password');
238+ + $client = new \Redmine\Client\Psr18Client(
239+ + $guzzle,
240+ + $psr17Factory,
241+ + $psr17Factory,
242+ + 'https://redmine.example.com',
243+ + 'username',
244+ + 'password'
245+ + );
233246```
234247
235248##### Guzzle configuration
@@ -280,7 +293,7 @@ $psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory();
280293+ };
281294+
282295// Instantiate with ApiKey
283- $client = new \Redmine\Client\Prs18Client (
296+ $client = new \Redmine\Client\Psr18Client (
284297- $guzzle,
285298+ $guzzleWrapper,
286299 $psr17Factory,
0 commit comments