Skip to content

Commit 658f638

Browse files
bug #817 Use default endpoints as fallbacks if Composer endpoint is specified as string (emodric)
This PR was merged into the 1.16-dev branch. Discussion ---------- Use default endpoints as fallbacks if Composer endpoint is specified as string Fixes #816 Commits ------- 92daa9c Use default endopoints as fallbacks if Composer endpoint is specified as a string
2 parents f05406b + 92daa9c commit 658f638

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Downloader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public function __construct(Composer $composer, IoInterface $io, $rfs)
6565
}
6666
} elseif (\is_array($endpoint) || false !== strpos($endpoint, '.json') || 'flex://defaults' === $endpoint) {
6767
$this->endpoints = array_values((array) $endpoint);
68+
if (\is_string($endpoint) && false !== strpos($endpoint, '.json')) {
69+
$this->endpoints[] = 'flex://defaults';
70+
}
6871
} else {
6972
$this->legacyEndpoint = rtrim($endpoint, '/');
7073
}

0 commit comments

Comments
 (0)