Skip to content

Commit 2d3845d

Browse files
[HttpClient] Deprecate using amphp/http-client < 5
1 parent 3fe77f0 commit 2d3845d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Symfony/Component/HttpClient/AmpHttpClient.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public function __construct(array $defaultOptions = [], ?callable $clientConfigu
7878
if (is_subclass_of(Request::class, HttpMessage::class)) {
7979
$this->multi = new AmpClientStateV5($clientConfigurator, $maxHostConnections, $maxPendingPushes, $this->logger);
8080
} else {
81+
if (\PHP_VERSION_ID >= 80400) {
82+
trigger_deprecation('symfony/http-client', '7.4', 'Using amphp/http-client < 5 is deprecated. Try running "composer require amphp/http-client:^5".');
83+
}
8184
$this->multi = new AmpClientStateV4($clientConfigurator, $maxHostConnections, $maxPendingPushes, $this->logger);
8285
}
8386
}

src/Symfony/Component/HttpClient/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
7.4
5+
---
6+
7+
* Deprecate using amphp/http-client < 5
8+
49
7.3
510
---
611

0 commit comments

Comments
 (0)