quantum-php / quantum-php/framework

Replace HttpClient php-curl-class transport with native curl adapters

Aperta
#565 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement http
Lingua principale
PHP
Stelle
36
Fork
22
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Summary

Follow up the HttpClient adapter/factory refactor by replacing the php-curl-class/php-curl-class transport behind Quantum-owned adapters with native curl implementations, while preserving the public HttpClient facade, factory methods, helpers, and adapter contracts introduced in the previous work.

This is an umbrella ticket. The implementation should be split into adapter-specific child tickets so the simpler single-request adapter can be validated separately from the higher-risk multi-request behavior.

Goals

  • Keep the public HttpClient API stable.
  • Keep HttpClientFactory and helper APIs stable:
    • HttpClientFactory::createRequest() / httpRequest()
    • HttpClientFactory::createMultiRequest() / httpMultiRequest()
    • HttpClientFactory::createAsyncMultiRequest() / httpAsyncMultiRequest()
  • Replace vendor-backed internals adapter by adapter.
  • Remove php-curl-class/php-curl-class only after both native adapters have acceptable parity.
  • Avoid leaking raw native curl handles through the public facade.

Child Tickets

  • Native CurlAdapter implementation for single requests.
  • Native MultiCurlAdapter implementation for multi and async requests.

Acceptance Criteria

  • Child tickets are completed and validated independently.
  • Existing HttpClient unit tests continue to pass.
  • Downstream single-request usage such as remote image downloads continues to work.
  • Multi-request callback behavior is covered before removing the dependency.
  • php-curl-class/php-curl-class is removed from Composer only after native single and multi adapters are both complete, reviewed, and validated.

Notes

The multi-curl adapter is the risky part because queueing, callbacks, request IDs, headers, cookies, options, errors, and response aggregation all need behavior parity. Do not treat dependency removal as complete after only the single-request adapter is native.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia leggendo l’adattatore HttpClient esistente e il refactoring della factory, inclusi gli entry point di HttpClientFactory e gli unit test esistenti di HttpClient. Tratta gli adattatori per richieste singole e multi/async come ticket figli separati; il lavoro è completato quando le API pubbliche sono stabili, il comportamento di request e callback è validato e php-curl-class viene rimosso solo dopo che entrambi gli adattatori hanno superato i controlli di parità.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
php
Ambito
backend, networking
Tipo di issue
Refactoring
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.