8000 Update Repository Symlink Helper · symfony/symfony@a9568d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit a9568d7

Browse files
zanbaldwinnicolas-grekas
authored andcommitted
Update Repository Symlink Helper
Add workaround for GLOB_BRACE, which is unavailable on certain platforms (such as Alpine).
1 parent 65bab99 commit a9568d7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

link

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ if (!is_dir("$argv[1]/vendor/symfony")) {
3737
$sfPackages = array('symfony/symfony' => __DIR__);
3838

3939
$filesystem = new Filesystem();
40-
foreach (glob(__DIR__.'/src/Symfony/{Bundle,Bridge,Component,Component/Security}/*', GLOB_BRACE | GLOB_ONLYDIR | GLOB_NOSORT) as $dir) {
40+
$braces = array('Bundle', 'Bridge', 'Component', 'Component/Security');
41+
$directories = call_user_func_array('array_merge', array_values(array_map(function ($part) {
42+
return glob(__DIR__.'/src/Symfony/'.$part.'/*', GLOB_ONLYDIR | GLOB_NOSORT);
43+
}, $braces)));
44+
45+
foreach ($directories as $dir) {
4146
if ($filesystem->exists($composer = "$dir/composer.json")) {
4247
$sfPackages[json_decode(file_get_contents($composer))->name] = $dir;
4348
}

0 commit comments

Comments
 (0)
0