Skip to content

[5.x] Remove the socket transport - #91

Open
Hackwar wants to merge 1 commit into
joomla-framework:5.x-devfrom
Hackwar:5.x-remove-socket-transport
Open

Hackwar wants to merge 1 commit into
joomla-framework:5.x-devfrom
Hackwar:5.x-remove-socket-transport

Conversation

@Hackwar

@Hackwar Hackwar commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary of Changes

Removes Joomla\Http\Transport\Socket, which #90 deprecates in 4.x. The socket transport implemented HTTP/1.x by hand on top of fsockopen(): no TLS configuration (no stream context, so no CA bundle, minimum TLS version or client certificate), no proxy support, no chunked decoding, and hand-written redirect handling. HttpFactory now chooses between the cURL and the stream transport only; the stream transport only needs allow_url_fopen.

  • src/Transport/Socket.php is deleted; nothing else in src/ referenced it (the factory discovers transports from the folder).
  • The transport tests no longer run against it.

Depends on #90 (the 4.x deprecation). When 4.x-dev is merged into 5.x-dev, the 4.x changes to src/Transport/Socket.php (#86 header lookups, #87 proxy warning, #90 deprecation) conflict as modify/delete and are resolved by keeping the deletion; their socket-specific tests (SocketDeprecationTest.php and the socket cases in HeaderNormalisationTest and ProxyOptionsTest) have to be removed in the same merge, and symfony/deprecation-contracts, added by #90 only for this deprecation, can be dropped again if nothing else uses it by then.

Testing Instructions

vendor/bin/phpunit with the stub served (php -S localhost:8080 -t Tests/stubs): all tests pass with the cURL and stream transports. HttpFactoryTest::testGetHttpTransports() expects ['Curl', 'Stream'].

Documentation Changes Required

  • New docs/v4-to-v5-update.md (linked from docs/index.md) with the removal, a before/after example and how to find call sites.
  • docs/classes/TransportInterface.md and docs/overview.md no longer describe the socket transport.

🤖 Generated with Claude Code

The socket transport implemented HTTP/1.x by hand on top of fsockopen(): it
could not be configured for TLS, did not support proxies and did not decode
chunked responses. It is deprecated in 4.x; remove it and document the
change in a new v4-to-v5 update guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Hackwar

Hackwar commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

As I wrote on #90, I'm not sure if this should be removed in 5.0 or if we should wait until 6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant