Parent
Part of #565.
Summary
Replace the vendor-backed Quantum\HttpClient\Adapters\CurlAdapter internals with a native curl implementation for single requests while preserving the existing HttpClient facade behavior and CurlAdapterInterface contract.
Scope
- Implement native single-request curl execution behind
CurlAdapter.
- Preserve current public
HttpClient methods and behavior:
createRequest()
setMethod()
setData()
setHeader() / setHeaders()
setOpt() / setOpts()
start()
getResponseBody()
getResponseHeaders()
getResponseCookies()
getErrors()
info()
url()
- Preserve factory/helper usage:
HttpClientFactory::createRequest($url)
httpRequest($url)
- Keep compatibility constructor path if still needed for transition tests, but do not expose native handles as the preferred public API.
Behavior To Match
- Request method handling via
CURLOPT_CUSTOMREQUEST.
- Request body handling through existing
setData() behavior.
- Header and option forwarding.
- Response body extraction.
- Response header normalization used by
HttpClient.
- Cookie extraction shape expected by existing tests.
- Error code/message behavior.
getInfo() behavior, including option value 0.
- URL reporting through
url().
Acceptance Criteria
CurlAdapter no longer depends on Curl\Curl for normal execution.
- Existing single-request
HttpClient behavior remains compatible.
- Focused unit tests cover native curl success, error, headers, cookies, info, URL, options, and payload behavior.
- Downstream remote image download smoke test passes through
httpRequest().
php-curl-class/php-curl-class remains installed until the multi-curl child ticket is complete.
Out Of Scope
- Native multi-curl implementation.
- Removing
php-curl-class/php-curl-class from Composer.
- Changing the public
HttpClient facade API.
Parent
Part of #565.
Summary
Replace the vendor-backed
Quantum\HttpClient\Adapters\CurlAdapterinternals with a native curl implementation for single requests while preserving the existingHttpClientfacade behavior andCurlAdapterInterfacecontract.Scope
CurlAdapter.HttpClientmethods and behavior:createRequest()setMethod()setData()setHeader()/setHeaders()setOpt()/setOpts()start()getResponseBody()getResponseHeaders()getResponseCookies()getErrors()info()url()HttpClientFactory::createRequest($url)httpRequest($url)Behavior To Match
CURLOPT_CUSTOMREQUEST.setData()behavior.HttpClient.getInfo()behavior, including option value0.url().Acceptance Criteria
CurlAdapterno longer depends onCurl\Curlfor normal execution.HttpClientbehavior remains compatible.httpRequest().php-curl-class/php-curl-classremains installed until the multi-curl child ticket is complete.Out Of Scope
php-curl-class/php-curl-classfrom Composer.HttpClientfacade API.