Skip to content

Commit

Permalink
bug #25258 [link] Prevent warnings when running link with 2.7 (dunglas)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.7 branch.

Discussion
----------

[link] Prevent warnings when running link with 2.7

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Prevent warnings when linking from 2.7 because some directories (like the Bridge/Propel1) don't contain `composer.json` files.

Commits
-------

3e7780c [link] Prevent warnings when running link with 2.7
  • Loading branch information
fabpot committed Dec 2, 2017
2 parents 5a6e2d7 + 3e7780c commit 7f5aeb7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions link
Expand Up @@ -35,11 +35,14 @@ 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) {
$sfPackages[json_decode(file_get_contents("$dir/composer.json"))->name] = $dir;
if ($filesystem->exists($composer = "$dir/composer.json")) {
$sfPackages[json_decode(file_get_contents($composer))->name] = $dir;
}
}

$filesystem = new Filesystem();
foreach (glob("$argv[1]/vendor/symfony/*", GLOB_ONLYDIR | GLOB_NOSORT) as $dir) {
$package = 'symfony/'.basename($dir);
if (is_link($dir)) {
Expand Down

0 comments on commit 7f5aeb7

Please sign in to comment.