1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00
This commit is contained in:
Jordi Boggiano 2018-07-24 14:32:52 +02:00
parent 02d56da414
commit ff59bbdab0
59 changed files with 196 additions and 111 deletions

View file

@ -175,13 +175,13 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
private function getUrlMatches()
{
$flags = GLOB_MARK | GLOB_ONLYDIR;
if (defined('GLOB_BRACE')) {
$flags |= GLOB_BRACE;
} elseif (strpos($this->url, '{') !== false || strpos($this->url, '}') !== false) {
throw new \RuntimeException('The operating system does not support GLOB_BRACE which is required for the url '. $this->url);
}
// Ensure environment-specific path separators are normalized to URL separators
return array_map(function ($val) {
return rtrim(str_replace(DIRECTORY_SEPARATOR, '/', $val), '/');