From e02f7ba58b3f6428d146f0d6eec51468d22da9b7 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 28 Oct 2024 21:58:03 +0100 Subject: [PATCH] Fix parsing of comments in arrays of sponsor info, fixes composer/packagist#1473 --- src/Composer/Repository/Vcs/GitHubDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Repository/Vcs/GitHubDriver.php b/src/Composer/Repository/Vcs/GitHubDriver.php index 09beb7680..97a334f94 100644 --- a/src/Composer/Repository/Vcs/GitHubDriver.php +++ b/src/Composer/Repository/Vcs/GitHubDriver.php @@ -235,7 +235,7 @@ class GitHubDriver extends VcsDriver $key = $match[1]; continue; } - if (Preg::isMatchStrictGroups('{^\[(.*)\](?:\s*#.*)?$}', $match[2], $match2)) { + if (Preg::isMatchStrictGroups('{^\[(.*?)\](?:\s*#.*)?$}', $match[2], $match2)) { foreach (array_map('trim', Preg::split('{[\'"]?\s*,\s*[\'"]?}', $match2[1])) as $item) { $result[] = ['type' => $match[1], 'url' => trim($item, '"\' ')]; }