Skip to content

Commit 0f25a5b

Browse files
[HttpClient] Suggest amphp/http-client v5 by default
1 parent 57e4fb8 commit 0f25a5b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

AmpHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
use Symfony\Contracts\Service\ResetInterface;
3434

3535
if (!interface_exists(DelegateHttpClient::class)) {
36-
throw new \LogicException('You cannot use "Symfony\Component\HttpClient\AmpHttpClient" as the "amphp/http-client" package is not installed. Try running "composer require amphp/http-client:^4.2.1".');
36+
throw new \LogicException('You cannot use "Symfony\Component\HttpClient\AmpHttpClient" as the "amphp/http-client" package is not installed. Try running "composer require amphp/http-client:^5".');
3737
}
3838

3939
if (\PHP_VERSION_ID < 80400 && is_subclass_of(Request::class, HttpMessage::class)) {

HttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function create(array $defaultOptions = [], int $maxHostConnection
6262
return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes);
6363
}
6464

65-
@trigger_error((\extension_loaded('curl') ? 'Upgrade' : 'Install').' the curl extension or run "composer require amphp/http-client:^4.2.1" to perform async HTTP operations, including full HTTP/2 support', \E_USER_NOTICE);
65+
@trigger_error((\extension_loaded('curl') ? 'Upgrade' : 'Install').' the curl extension or run "composer require amphp/http-client:^5" to perform async HTTP operations, including full HTTP/2 support', \E_USER_NOTICE);
6666

6767
return new NativeHttpClient($defaultOptions, $maxHostConnections);
6868
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"require-dev": {
3232
"amphp/http-client": "^4.2.1|^5.0",
3333
"amphp/http-tunnel": "^1.0|^2.0",
34-
"amphp/socket": "^1.1",
3534
"guzzlehttp/promises": "^1.4|^2.0",
3635
"nyholm/psr7": "^1.0",
3736
"php-http/httplug": "^1.0|^2.0",
@@ -46,6 +45,7 @@
4645
},
4746
"conflict": {
4847
"amphp/amp": "<2.5",
48+
"amphp/socket": "<1.1",
4949
"php-http/discovery": "<1.15",
5050
"symfony/http-foundation": "<6.4"
5151
},

0 commit comments

Comments
 (0)