Skip to content

Commit

Permalink
bug #1018 fix: wrong recipe history URL format (meyerbaptiste)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.x branch.

Discussion
----------

fix: wrong recipe history URL format

According to the GitHub [documentation](https://docs.github.com/en/rest/commits/commits), the format of the `since` query parameter should be `YYYY-MM-DDTHH:MM:SSZ`.

<details>
  <summary>Preview</summary>

### Before
<img width="500" alt="Capture d’écran 2024-03-01 à 20 10 36" src="https://github.com/symfony/flex/assets/4034907/92052dda-6f65-4804-9fae-0daa33c26989">

### After
<img width="500" alt="Capture d’écran 2024-03-01 à 20 11 00" src="https://github.com/symfony/flex/assets/4034907/5caa6261-be90-44ed-b203-66e447f31e7b">
</details>

Commits
-------

57ac7d3 fix: wrong recipe history URL format
  • Loading branch information
fabpot committed Mar 2, 2024
2 parents 6b46a00 + 57ac7d3 commit 06b58a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Command/RecipesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ private function displayPackageInformation(Recipe $recipe)

// show commits since one second after the currently-installed recipe
if (null !== $commitDate) {
$historyUrl .= '?since='.(new \DateTime($commitDate))->modify('+1 seconds')->format('c\Z');
$historyUrl .= '?since=';
$historyUrl .= (new \DateTime($commitDate))
->setTimezone(new \DateTimeZone('UTC'))
->modify('+1 seconds')
->format('Y-m-d\TH:i:s\Z');
}

$io->write('<info>recipe history</info> : '.$historyUrl);
Expand Down

0 comments on commit 06b58a5

Please sign in to comment.