From 11bec43bbe530dd5f2dbe44d93f241e5bdf8513b Mon Sep 17 00:00:00 2001 From: Haylan Date: Tue, 7 Jul 2026 13:31:09 +0200 Subject: [PATCH] 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. --- src/Service/Provider/ProviderInterface.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Service/Provider/ProviderInterface.php b/src/Service/Provider/ProviderInterface.php index 015b559..c8203f8 100644 --- a/src/Service/Provider/ProviderInterface.php +++ b/src/Service/Provider/ProviderInterface.php @@ -6,8 +6,11 @@ namespace App\Service\Provider; interface ProviderInterface { + /** Fire the HTTP request(s) without blocking; returns an opaque handle for resolveFetch(). */ + public function startFetch(): mixed; + /** @return array date (Y-m-d) => contribution count */ - public function fetch(): array; + public function resolveFetch(mixed $handle): array; public function isConfigured(): bool;