mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
GLOB_BRACE is not defined on all platforms
This commit is contained in:
parent
b3d6a17518
commit
e89d16c47d
1 changed files with 7 additions and 1 deletions
|
@ -174,9 +174,15 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
|
|||
*/
|
||||
private function getUrlMatches()
|
||||
{
|
||||
$flags = GLOB_MARK | GLOB_ONLYDIR;
|
||||
|
||||
if (defined('GLOB_BRACE')) {
|
||||
$flags |= GLOB_BRACE;
|
||||
}
|
||||
|
||||
// Ensure environment-specific path separators are normalized to URL separators
|
||||
return array_map(function ($val) {
|
||||
return rtrim(str_replace(DIRECTORY_SEPARATOR, '/', $val), '/');
|
||||
}, glob($this->url, GLOB_MARK | GLOB_ONLYDIR | GLOB_BRACE));
|
||||
}, glob($this->url, $flags));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue