refactor(provider): split fetch() into startFetch()/resolveFetch()

Splits the provider contract into a non-blocking startFetch() that
fires the HTTP request(s) and a resolveFetch() that reads the result,
so callers can fire every provider's request before blocking on any
of them. Symfony HttpClient is already async under the hood -
request() doesn't block until you read the response - so this needs
no new dependency.
This commit is contained in:
2026-07-07 13:31:09 +02:00
parent 09c0be8312
commit 11bec43bbe
+4 -1
View File
@@ -6,8 +6,11 @@ namespace App\Service\Provider;
interface ProviderInterface interface ProviderInterface
{ {
/** Fire the HTTP request(s) without blocking; returns an opaque handle for resolveFetch(). */
public function startFetch(): mixed;
/** @return array<string, int> date (Y-m-d) => contribution count */ /** @return array<string, int> date (Y-m-d) => contribution count */
public function fetch(): array; public function resolveFetch(mixed $handle): array;
public function isConfigured(): bool; public function isConfigured(): bool;