Skip to content

Commit 9ebfc77

Browse files
Merge branch '4.3' into 4.4
* 4.3: [ProxyManager] fix generating proxies for root-namespaced classes [DI] skip looking for config class when the extension class is anonymous Fix typo [Dotenv] FIX missing getenv [HttpClient][Psr18Client] Remove Psr18ExceptionTrait
2 parents e23449c + e456564 commit 9ebfc77

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

Psr18Client.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function createUri(string $uri = ''): UriInterface
190190
/**
191191
* @internal
192192
*/
193-
trait Psr18ExceptionTrait
193+
class Psr18NetworkException extends \RuntimeException implements NetworkExceptionInterface
194194
{
195195
private $request;
196196

@@ -206,18 +206,21 @@ public function getRequest(): RequestInterface
206206
}
207207
}
208208

209-
/**
210-
* @internal
211-
*/
212-
class Psr18NetworkException extends \RuntimeException implements NetworkExceptionInterface
213-
{
214-
use Psr18ExceptionTrait;
215-
}
216-
217209
/**
218210
* @internal
219211
*/
220212
class Psr18RequestException extends \InvalidArgumentException implements RequestExceptionInterface
221213
{
222-
use Psr18ExceptionTrait;
214+
private $request;
215+
216+
public function __construct(TransportExceptionInterface $e, RequestInterface $request)
217+
{
218+
parent::__construct($e->getMessage(), 0, $e);
219+
$this->request = $request;
220+
}
221+
222+
public function getRequest(): RequestInterface
223+
{
224+
return $this->request;
225+
}
223226
}

0 commit comments

Comments
 (0)