Skip to content

Commit 5e20465

Browse files
committed
Revert deprecating HttplugClient::sendRequest()
1 parent a7b11f8 commit 5e20465

File tree

3 files changed

+0
-29
lines changed

3 files changed

+0
-29
lines changed

UPGRADE-6.3.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ HttpClient
6161
----------
6262

6363
* Deprecate the `Http\Client\HttpClient` service, use the `Http\Client\HttpAsyncClient` service for method `::sendAsyncRequest` and `psr\Http\Client\ClientInterface` for `::sendRequest` instead
64-
* Deprecate `Symfony\Component\HttpClient\HttplugClient::sendRequest`, use `Psr\Http\Client\ClientInterface::sendRequest` instead
6564

6665
HttpFoundation
6766
--------------

src/Symfony/Component/HttpClient/HttplugClient.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,8 @@ public function withOptions(array $options): static
108108
return $clone;
109109
}
110110

111-
/**
112-
* @deprecated since Symfony 6.3, use {@link ClientInterface::sendRequest()} instead
113-
*/
114111
public function sendRequest(RequestInterface $request): Psr7ResponseInterface
115112
{
116-
trigger_deprecation('symfony/http-client', '6.3', 'The "%s()" method is deprecated, use "%s::sendRequest()" instead.', __METHOD__, ClientInterface::class);
117-
118113
try {
119114
return $this->waitLoop->createPsr7Response($this->sendPsr7Request($request));
120115
} catch (TransportExceptionInterface $e) {

src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Http\Promise\Promise;
1919
use PHPUnit\Framework\TestCase;
2020
use Psr\Http\Message\ResponseInterface;
21-
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
2221
use Symfony\Component\HttpClient\Exception\TransportException;
2322
use Symfony\Component\HttpClient\HttplugClient;
2423
use Symfony\Component\HttpClient\MockHttpClient;
@@ -28,20 +27,13 @@
2827

2928
class HttplugClientTest extends TestCase
3029
{
31-
use ExpectDeprecationTrait;
32-
3330
public static function setUpBeforeClass(): void
3431
{
3532
TestHttpServer::start();
3633
}
3734

38-
/**
39-
* @group legacy
40-
*/
4135
public function testSendRequest()
4236
{
43-
$this->expectDeprecation('Since symfony/http-client 6.3: The "Symfony\Component\HttpClient\HttplugClient::sendRequest()" method is deprecated, use "Psr\Http\Client\ClientInterface::sendRequest()" instead.');
44-
4537
$client = new HttplugClient(new NativeHttpClient());
4638

4739
$response = $client->sendRequest($client->createRequest('GET', 'http://localhost:8057'));
@@ -111,13 +103,8 @@ public function testWait()
111103
$this->assertFalse($failureCallableCalled, 'Failure callable should not be called when request is successful.');
112104
}
113105

114-
/**
115-
* @group legacy
116-
*/
117106
public function testPostRequest()
118107
{
119-
$this->expectDeprecation('Since symfony/http-client 6.3: The "Symfony\Component\HttpClient\HttplugClient::sendRequest()" method is deprecated, use "Psr\Http\Client\ClientInterface::sendRequest()" instead.');
120-
121108
$client = new HttplugClient(new NativeHttpClient());
122109

123110
$request = $client->createRequest('POST', 'http://localhost:8057/post')
@@ -129,13 +116,8 @@ public function testPostRequest()
129116
$this->assertSame(['foo' => '0123456789', 'REQUEST_METHOD' => 'POST'], $body);
130117
}
131118

132-
/**
133-
* @group legacy
134-
*/
135119
public function testNetworkException()
136120
{
137-
$this->expectDeprecation('Since symfony/http-client 6.3: The "Symfony\Component\HttpClient\HttplugClient::sendRequest()" method is deprecated, use "Psr\Http\Client\ClientInterface::sendRequest()" instead.');
138-
139121
$client = new HttplugClient(new NativeHttpClient());
140122

141123
$this->expectException(NetworkException::class);
@@ -168,13 +150,8 @@ public function testAsyncNetworkException()
168150
$promise->wait(true);
169151
}
170152

171-
/**
172-
* @group legacy
173-
*/
174153
public function testRequestException()
175154
{
176-
$this->expectDeprecation('Since symfony/http-client 6.3: The "Symfony\Component\HttpClient\HttplugClient::sendRequest()" method is deprecated, use "Psr\Http\Client\ClientInterface::sendRequest()" instead.');
177-
178155
$client = new HttplugClient(new NativeHttpClient());
179156

180157
$this->expectException(RequestException::class);

0 commit comments

Comments
 (0)