Skip to content

[4.x] Correct the overview documentation - #97

Open
Hackwar wants to merge 1 commit into
joomla-framework:4.x-devfrom
Hackwar:4.x-docs-overview-corrections
Open

Hackwar wants to merge 1 commit into
joomla-framework:4.x-devfrom
Hackwar:4.x-docs-overview-corrections

Conversation

@Hackwar

@Hackwar Hackwar commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary of Changes

docs/overview.md contradicted the code in several places:

  1. "Working with options" documented 'headers.Accept' keys. Http reads $options['headers'] as an array, so with a plain array that key is ignored; it only works with a Registry, through set('headers.Accept', …). The example also never passed $options to the client. Now it uses ['headers' => ['Accept' => …]], creates the client with it, and explains the Registry case.
  2. "Redirects are followed without a limit" is wrong: PHP's cURL extension sets CURLOPT_MAXREDIRS to 20 ("Maximum (20) redirects followed"), libcurl only follows redirects to HTTP/HTTPS/FTP/FTPS, and PHP's stream wrapper also stops after 20 redirects. The paragraph now says that and how to lower or disable it.
  3. "There is no request object" ignored sendRequest(RequestInterface); there is now an example with a PSR-7 request.
  4. The PUT section described a POST request.
  5. Undocumented options: a table lists the options Http and the transports read (headers, timeout, userAgent, follow_location, protocolVersion, transport.curl/transport.stream/transport.socket, curl.certpath/stream.certpath) and links to the transport options in TransportInterface.md. The proxy.* options are documented by [4.x] Use the same proxy options in the cURL and stream transports #87 together with their fix, and the default user agent by [4.x] Apply the default user agent in Http instead of the factory #94.

Docs only, no code change.

Testing Instructions

Read docs/overview.md. To check the redirect limit, fetch a redirect loop through the cURL transport: it fails with "Maximum (20) redirects followed".

Documentation Changes Required

This is the documentation change. Several open PRs touch the same paragraphs of docs/overview.md, and whichever is merged second needs a small rebase:

🤖 Generated with Claude Code

The overview documented "headers.Accept" dotted option keys, which a plain
options array does not support, and its example never passed the options
to the client. It claimed that redirects are followed without a limit,
that there is no request object, and described POST in the PUT section.
Several options were not documented at all.

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

Hackwar commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Approved

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