protected function ModifiedFiles::getPromise in Automatic Updates 8
Get a promise.
Parameters
string $url: The URL.
array $info: The extension's info.
Return value
\GuzzleHttp\Promise\PromiseInterface The promise.
1 call to ModifiedFiles::getPromise()
- ModifiedFiles::getHashRequests in src/
Services/ ModifiedFiles.php - Get an iterator of promises that return a resource stream.
File
- src/
Services/ ModifiedFiles.php, line 173
Class
- ModifiedFiles
- Modified files service.
Namespace
Drupal\automatic_updates\ServicesCode
protected function getPromise($url, array $info) {
return $this->httpClient
->requestAsync('GET', $url, [
'stream' => TRUE,
'read_timeout' => 30,
])
->then(static function (ResponseInterface $response) use ($info) {
return [
'contents' => $response
->getBody()
->getContents(),
'info' => $info,
];
});
}