Repository navigation
Conversation
The socket transport implements HTTP/1.x by hand: it cannot be configured for TLS, does not support proxies and does not decode chunked responses. The cURL and stream transports cover every environment it is used in. Mark it deprecated and trigger a deprecation when it is created, ahead of its removal in 5.0. This adds symfony/deprecation-contracts as a dependency, as in the other framework packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
I agree with deprecating it, but the question would be if we want to wait until 6.0 for the removal or already do this in 5.0. |
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
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.
Summary of Changes
The socket transport implements HTTP/1.x by hand on top of
fsockopen(): it cannot be configured for TLS (no stream context, so no CA bundle, minimum TLS version or client certificate), does not support proxies and does not decode chunked responses. The cURL and stream transports cover every environment in which it would be picked: the stream transport only needsallow_url_fopen.This deprecates it ahead of its removal in 5.0:
@deprecated 5.0on the class;trigger_deprecation('joomla/http', '__DEPLOY_VERSION__', …)and then the parent constructor;symfony/deprecation-contracts(^2|^3, as in the other framework packages) is added torequire; it is the package's first use of it.The removal for 5.0 follows in a separate PR against
5.x-dev.Testing Instructions
Tests/Transport/SocketDeprecationTest.php(new): creating aSocketraises exactly oneE_USER_DEPRECATEDwith the removal notice (before: none). The existing transport tests still pass with the deprecation (it is silenced the usual way).Documentation Changes Required
docs/classes/TransportInterface.md: the transport table marksTransport\Socketas deprecated. The 5.0 update guide entry is added with the removal PR (there is nodocs/v4-to-v5-update.mdon 4.x-dev).🤖 Generated with Claude Code