Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 573e462

Browse filesBrowse files
minor #26091 Update Repository Symlink Helper (zanbaldwin)
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #26091). Discussion ---------- Update Repository Symlink Helper The `link` script is super-useful (thanks @dunglas!) for development - but for some it's unusable in its current form due to the use of `GLOB_BRACE` which is [unavailable on certain platforms](zendframework/zend-stdlib#58 (comment)) (such as Alpine) and is a platform-specific problem that will not be fixed in future versions of PHP. I know the code is a little condensed and not the easiest to read, but I thought that wasn't really an issue considering this is just a development helper script and not part of the 'official' Symfony code base. | Q | A | ------------- | --- | Branch? | `3.3` | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | No tests for `/link` | Fixed tickets | | License | MIT | Doc PR | can't find documentation for `/link` <!-- - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. - Replace this comment by a description of what your PR is solving. --> Commits ------- a9568d7 Update Repository Symlink Helper
2 parents 65bab99 + a9568d7 commit 573e462
Copy full SHA for 573e462

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎link

Copy file name to clipboardExpand all lines: link
+6-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.