-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpClient] Remove support for amphp/http-client < 5 #60712
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
nicolas-grekas
commented
Jun 5, 2025
Q | A |
---|---|
Branch? | 8.0 |
Bug fix? | yes |
New feature? | yes |
Deprecations? | no |
Issues | - |
License | MIT |
…ath::key()` (alexandre-daubois) This PR was merged into the 7.3 branch. Discussion ---------- [JsonPath] Always use brackets notation with `JsonPath::key()` | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#60664 | License | MIT As explained in the issue, the dot notation can lead to invalid paths when used with some identifiers (for example, when it contains a `-`). The issue gives the following example: ```php use Symfony\Component\JsonPath\JsonCrawler; use Symfony\Component\JsonPath\JsonPath; $jsonPathExpression = (string) (new JsonPath)->key('some-prop'); dump((new JsonCrawler('{"some-prop": "example value"}'))->find($jsonPathExpression)); ``` Let's always use the brackets notation in `JsonPath::key()`. Dot notation is only a shorthand to the verbose brackets version and this solves the problem without having to do further analysis on the key. Added a few tests to ensure the brackets notation works well too. Commits ------- 442970b [JsonPath] Always use brackets notation with `JsonPath::key()`
…las-grekas) This PR was merged into the 7.3 branch. Discussion ---------- [Security] Keep roles when serializing tokens | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#60656, Fix symfony#60687 | License | MIT Looks like I missed something in symfony#59558 Commits ------- 8092ffd [Security] Keep roles when serializing tokens
…fterClass (cquintana92) This PR was submitted for the 7.4 branch but it was squashed and merged into the 6.4 branch instead. Discussion ---------- [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | None | License | MIT Comes from symfony#60564 This PR performs the following change: In `KernelTestCase`, the kernel is shut down after every test, as per the `static::ensureKernelShutdown()` call in the `tearDown` function. However, if one was to perform any extra code in their `tearDownAfterClass` and call `getContainer`, it would boot up a new kernel, which would then be left dangling. The main issue with that is that when the next Test class is executed, there would already be a booted kernel, so it could happen that it was pointing to dangling resources. By adding this call to `static::ensureKernelShutdown` in the `tearDownAfterClass`, we can ensure that no dangling kernels are left even after the test class has finished. Commits ------- c193b98 [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass
…eprecation messages (dheineman) This PR was merged into the 7.3 branch. Discussion ---------- [WebProfilerBundle] Fix typos in routing config deprecation messages | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Fixes some typos in the deprecation messages introduced in symfony#60232. Commits ------- 2547946 [WebProfilerBundle] Fix typos in routing config deprecation messages
nicolas-grekas
commented
Jun 5, 2025
use Symfony\Component\HttpClient\Response\ResponseStream; | ||
use Symfony\Contracts\HttpClient\HttpClientInterface; | ||
use Symfony\Contracts\HttpClient\ResponseInterface; | ||
use Symfony\Contracts\HttpClient\ResponseStreamInterface; | ||
use Symfony\Contracts\Service\ResetInterface; | ||
|
||
if (!interface_exists(DelegateHttpClient::class)) { | ||
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".'); | ||
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".'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also fixed on 7.4 as dc09be9
4a450b2
to
c6bf4dc
Compare
* 6.4: cs tweak [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass Revert "bug symfony#60564 [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass (cquintana92)"
* 7.2: cs tweak [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass Revert "bug symfony#60564 [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass (cquintana92)"
…ult (nicolas-grekas) This PR was merged into the 7.3 branch. Discussion ---------- [HttpClient] Suggest amphp/http-client v5 by default | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Commits ------- 851c22c [HttpClient] Suggest amphp/http-client v5 by default
* 7.3: [HttpClient] Suggest amphp/http-client v5 by default [WebProfilerBundle] Fix typos in routing config deprecation messages cs tweak [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass Revert "bug symfony#60564 [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass (cquintana92)" [Security] Keep roles when serializing tokens [JsonPath] Always use brackets notation with `JsonPath::key()`
…olas-grekas) This PR was merged into the 7.4 branch. Discussion ---------- [Security] conflict with event-subscriber v8 | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT `Http\Firewall` doesn't have return types in v7.4 to make upgrades smoother, but this also means that this class is not compatible with `EventSubscriberInterface` v8 since we added return types there. Commits ------- 542cc71 [Security] conflict with event-subscriber v8
* 7.4: [HttpClient] Suggest amphp/http-client v5 by default [Security] conflict with event-subscriber v8 Fix leftover [WebProfilerBundle] Fix typos in routing config deprecation messages cs tweak [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass Revert "bug symfony#60564 [FrameworkBundle] ensureKernelShutdown in tearDownAfterClass (cquintana92)" [Security] Keep roles when serializing tokens [JsonPath] Always use brackets notation with `JsonPath::key()`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.