Skip to content

Refactor HttpClient into native curl adapters for single and multi requests and deprecate php-curl-class #534

Closed

Description

@armanist

Summary

Refactor the current HttpClient package into a Quantum-owned curl transport layer with explicit native adapters for:

  • single requests
  • multi requests

As part of this work, deprecate php-curl-class/php-curl-class and move adapter behavior to native curl handling.

Why

Current state:

  • HttpClient depends directly on Curl\Curl and Curl\MultiCurl
  • single and multi behavior live in one mutable class
  • the package is shaped by a third-party API instead of Quantum-owned transport boundaries
  • several framework packages already rely on the current HttpClient surface

The goal is to replace that vendor-shaped design with native Quantum adapters and make the transport layer fully framework-owned.

Scope

This ticket should:

  • introduce explicit native adapters for single and multi curl execution
  • deprecate php-curl-class/php-curl-class
  • move current transport behavior to Quantum-owned native curl implementations
  • keep or redesign the HttpClient facade as needed around the new adapter structure

If this introduces breaking changes in the HTTP client layer, that is acceptable.

Proposed Changes

  • add explicit native curl adapters for single and multi request execution
  • remove vendor-shaped internals and dynamic passthrough behavior where possible
  • replace third-party client dependence with native curl handling
  • update current framework consumers to use the new internal architecture
  • preserve existing capabilities at the feature level where practical:
    • single requests
    • multi requests
    • async multi callbacks
    • normalized response and error handling

Acceptance Criteria

  • single and multi curl execution are represented by explicit native adapters
  • php-curl-class/php-curl-class is deprecated as part of the package direction
  • the framework is no longer architecturally centered on Curl\Curl / Curl\MultiCurl
  • internal consumers are updated to work with the new architecture
  • tests cover both single and multi adapter flows
  • docs are updated to reflect the new structure and any breaking API changes

Notes

Relevant code:

  • src/HttpClient/HttpClient.php
  • tests/Unit/HttpClient/HttpClientTest.php

Current internal consumers include:

  • Captcha
  • Mailer adapters
  • Storage cloud integrations

Activity

  1. added this to the 3.1.0 milestone on Jun 18, 2026
  2. added
    httpHTTP transport, redirects, and request/response behavior
    on Jun 20, 2026
  3. added 9 commits that reference this issue on Jul 14, 2026
  4. added 5 commits that reference this issue on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpHTTP transport, redirects, and request/response behavior

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions