Skip to content

Commit

Permalink
bug #961 Fix recipe history url (rosier)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.x branch.

Discussion
----------

Fix recipe history url

Recipes that are installed from the branch master now point to a history url that results in a 404.

Before:
<img width="955" alt="flex-before" src="https://user-images.githubusercontent.com/117380/206744288-5ccc312c-da35-4baa-9aab-7cee1f9025d9.png">

After:
<img width="955" alt="flex-after" src="https://user-images.githubusercontent.com/117380/206744512-76d733d8-c9cd-417f-9ed5-f45dde73345c.png">

Commits
-------

2aa65bb Fix recipe history url
  • Loading branch information
nicolas-grekas committed Jan 30, 2023
2 parents d309f02 + 2aa65bb commit 51077ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Command/RecipesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ private function displayPackageInformation(Recipe $recipe)
$lockBranch = $recipeLock['recipe']['branch'] ?? null;
$lockVersion = $recipeLock['recipe']['version'] ?? $recipeLock['version'] ?? null;

if ('master' === $lockBranch && \in_array($lockRepo, ['github.com/symfony/recipes', 'github.com/symfony/recipes-contrib'])) {
$lockBranch = 'main';
}

$status = '<comment>up to date</comment>';
if ($recipe->isAuto()) {
$status = '<comment>auto-generated recipe</comment>';
Expand Down

0 comments on commit 51077ed

Please sign in to comment.