Skip to content

[HttpClient] Deprecate using amphp/http-client < 5 #60704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions UPGRADE-7.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
UPGRADE FROM 7.3 to 7.4
=======================

Symfony 7.4 is a minor release. According to the Symfony release process, there should be no significant
backward compatibility breaks. Minor backward compatibility breaks are prefixed in this document with
`[BC BREAK]`, make sure your code is compatible with these entries before upgrading.
Read more about this in the [Symfony documentation](https://symfony.com/doc/7.4/setup/upgrade_minor.html).

If you're upgrading from a version below 7.3, follow the [7.3 upgrade guide](UPGRADE-7.3.md) first.

HttpClient
----------

* Deprecate using amphp/http-client < 5
3 changes: 3 additions & 0 deletions src/Symfony/Component/HttpClient/AmpHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public function __construct(array $defaultOptions = [], ?callable $clientConfigu
if (is_subclass_of(Request::class, HttpMessage::class)) {
$this->multi = new AmpClientStateV5($clientConfigurator, $maxHostConnections, $maxPendingPushes, $this->logger);
} else {
if (\PHP_VERSION_ID >= 80400) {
trigger_deprecation('symfony/http-client', '7.4', 'Using amphp/http-client < 5 is deprecated. Try running "composer require amphp/http-client:^5".');
}
$this->multi = new AmpClientStateV4($clientConfigurator, $maxHostConnections, $maxPendingPushes, $this->logger);
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/Symfony/Component/HttpClient/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

7.4
---

* Deprecate using amphp/http-client < 5

7.3
---

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function create(array $defaultOptions = [], int $maxHostConnection
return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes);
}

@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);
@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);

return new NativeHttpClient($defaultOptions, $maxHostConnections);
}
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy