Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allow installing/updating of apps again
The Guzzle API changed. We shall now use sink

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed Jan 12, 2021
commit 9b58a027e3312d14ee3cd724841ae32af481d03c
2 changes: 1 addition & 1 deletion lib/private/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public function downloadApp($appId, $allowUnstable = false) {
$tempFile = $this->tempManager->getTemporaryFile('.tar.gz');
$timeout = $this->isCLI ? 0 : 120;
$client = $this->clientService->newClient();
$client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => $timeout]);
$client->get($app['releases'][0]['download'], ['sink' => $tempFile, 'timeout' => $timeout]);

// Check if the signature actually matches the downloaded content
$certificate = openssl_get_publickey($app['certificate']);
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/InstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public function testDownloadAppWithInvalidSignature() {
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
->with('https://example.com', ['sink' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->once())
->method('newClient')
Expand Down Expand Up @@ -432,7 +432,7 @@ public function testDownloadAppWithMoreThanOneFolderDownloaded() {
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
->with('https://example.com', ['sink' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->once())
->method('newClient')
Expand Down Expand Up @@ -515,7 +515,7 @@ public function testDownloadAppWithMismatchingIdentifier() {
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
->with('https://example.com', ['sink' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->once())
->method('newClient')
Expand Down Expand Up @@ -594,7 +594,7 @@ public function testDownloadAppSuccessful() {
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
->with('https://example.com', ['sink' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->at(0))
->method('newClient')
Expand Down Expand Up @@ -680,7 +680,7 @@ public function testDownloadAppWithDowngrade() {
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['save_to' => $realTmpFile, 'timeout' => 120]);
->with('https://example.com', ['sink' => $realTmpFile, 'timeout' => 120]);
$this->clientService
->expects($this->at(1))
->method('newClient')
Expand Down