Skip to content

Commit e2faf2b

Browse files
bug #903 Fix relative URLs in index.json not working (salmen)
This PR was merged into the 1.x branch. Discussion ---------- Fix relative URLs in index.json not working Hello, This PR fixes #897. It relates also to #872. `@nicolas`-grekas I found out that in [index.json](https://raw.githubusercontent.com/symfony/recipes-contrib/flex/main/index.json), the name of the attribute is _recipe_template_relative_, and not _recipes_template_relative_ as expected in the source code. And we should also set _recipe_template_ , instead of _recipes_template_. Regards, Commits ------- fae4e7f Update Downloader.php
2 parents 130851b + fae4e7f commit e2faf2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Downloader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ public function getRecipes(array $operations): array
224224
break;
225225
}
226226

227-
if (isset($links['recipes_template_relative'])) {
228-
$links['recipes_template'] = preg_replace('{[^/\?]*+(?=\?|$)}', $links['recipes_template_relative'], $endpoint, 1);
227+
if (isset($links['recipe_template_relative'])) {
228+
$links['recipe_template'] = preg_replace('{[^/\?]*+(?=\?|$)}', $links['recipe_template_relative'], $endpoint, 1);
229229
}
230230

231231
$urls[] = strtr($links['recipe_template'], [

0 commit comments

Comments
 (0)