Update Repository Symlink Helper
Add workaround for GLOB_BRACE, which is unavailable on certain platforms (such as Alpine).
This commit is contained in:
parent
65bab998e5
commit
a9568d7c60
7
link
7
link
|
@ -37,7 +37,12 @@ if (!is_dir("$argv[1]/vendor/symfony")) {
|
|||
$sfPackages = array('symfony/symfony' => __DIR__);
|
||||
|
||||
$filesystem = new Filesystem();
|
||||
foreach (glob(__DIR__.'/src/Symfony/{Bundle,Bridge,Component,Component/Security}/*', GLOB_BRACE | GLOB_ONLYDIR | GLOB_NOSORT) as $dir) {
|
||||
$braces = array('Bundle', 'Bridge', 'Component', 'Component/Security');
|
||||
$directories = call_user_func_array('array_merge', array_values(array_map(function ($part) {
|
||||
return glob(__DIR__.'/src/Symfony/'.$part.'/*', GLOB_ONLYDIR | GLOB_NOSORT);
|
||||
}, $braces)));
|
||||
|
||||
foreach ($directories as $dir) {
|
||||
if ($filesystem->exists($composer = "$dir/composer.json")) {
|
||||
$sfPackages[json_decode(file_get_contents($composer))->name] = $dir;
|
||||
}
|
||||
|
|
Reference in New Issue