From dac3e6f4b895489cfb7e2be637a43de7e0e0e6b2 Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Fri, 8 Jul 2022 10:53:31 +0200 Subject: [PATCH] Fix array access in gitlab repo --- src/shared/repository/GitlabRepository.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/repository/GitlabRepository.php b/src/shared/repository/GitlabRepository.php index 7bb8fd77..0c365729 100644 --- a/src/shared/repository/GitlabRepository.php +++ b/src/shared/repository/GitlabRepository.php @@ -30,7 +30,7 @@ public function getReleasesByRequestedPhar(RequestedPhar $requestedPhar): Releas foreach ($this->jsonData->getParsed() as $entry) { try { - $version = new Version($entry->tag_name); + $version = new Version($entry['tag_name']); } catch (InvalidVersionException $exception) { // we silently ignore invalid version identifiers for now as they are // likely to be an arbitrary tag that erroneously got promoted to release @@ -39,9 +39,9 @@ public function getReleasesByRequestedPhar(RequestedPhar $requestedPhar): Releas $pharUrl = null; $signatureUrl = null; - foreach ($entry->assets->links as $asset) { - $assetName = $asset->name; - $url = $asset->url; + foreach ($entry['assets']['links'] as $asset) { + $assetName = $asset['name']; + $url = $asset['url']; if (substr($assetName, -5, 5) === '.phar') { $pharUrl = new PharUrl($url);