Skip to content

Commit 62b4a98

Browse files
Fix compat with composer v2
1 parent e532411 commit 62b4a98

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ParallelDownloader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function callbackGet($notificationCode, $severity, $message, $messageCode
216216
/**
217217
* {@inheritdoc}
218218
*/
219-
protected function getRemoteContents($originUrl, $fileUrl, $context, array &$responseHeaders = null)
219+
protected function getRemoteContents($originUrl, $fileUrl, $context, array &$responseHeaders = null, $maxFileSize = null)
220220
{
221221
if (isset(self::$cache[$fileUrl])) {
222222
self::$cacheNext = false;
@@ -234,7 +234,7 @@ protected function getRemoteContents($originUrl, $fileUrl, $context, array &$res
234234
self::$cacheNext = false;
235235

236236
if (3 < \func_num_args()) {
237-
$result = $this->getRemoteContents($originUrl, $fileUrl, $context, $responseHeaders);
237+
$result = $this->getRemoteContents($originUrl, $fileUrl, $context, $responseHeaders, $maxFileSize);
238238
self::$cache[$fileUrl] = [$responseHeaders, $result];
239239
} else {
240240
$result = $this->getRemoteContents($originUrl, $fileUrl, $context);
@@ -245,7 +245,7 @@ protected function getRemoteContents($originUrl, $fileUrl, $context, array &$res
245245
}
246246

247247
if (!$this->downloader || !preg_match('/^https?:/', $fileUrl)) {
248-
return parent::getRemoteContents($originUrl, $fileUrl, $context, $responseHeaders);
248+
return parent::getRemoteContents($originUrl, $fileUrl, $context, $responseHeaders, $maxFileSize);
249249
}
250250

251251
try {
@@ -259,7 +259,7 @@ protected function getRemoteContents($originUrl, $fileUrl, $context, array &$res
259259
} catch (TransportException $e) {
260260
$this->io->writeError('Retrying download: '.$e->getMessage(), true, IOInterface::DEBUG);
261261

262-
return parent::getRemoteContents($originUrl, $fileUrl, $context, $responseHeaders);
262+
return parent::getRemoteContents($originUrl, $fileUrl, $context, $responseHeaders, $maxFileSize);
263263
} catch (\Throwable $e) {
264264
$responseHeaders = [];
265265
throw $e;

0 commit comments

Comments
 (0)