Skip to content

Commit dbaae5a

Browse files
committed
Reinstate tagged-release branch reference override in getBrowsableRepositoryUrl() of the Metadata entity
1 parent 0b495a1 commit dbaae5a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Doctrine/Entity/Metadata.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,11 @@ public function getBrowsableRepositoryUrl(): ?string
592592
return null;
593593
}
594594

595+
if (false === $this->version->isDevelopment() && $this === $this->version->getCurrentMetadata()) {
596+
// Use the VCS tag only if it's the current metadata
597+
$reference = $this->versionName;
598+
}
599+
595600
if (str_starts_with($url, 'https://github.com/')) {
596601
return "$url/tree/$reference";
597602
} elseif (str_starts_with($url, 'https://gitlab.com/')) {

0 commit comments

Comments
 (0)