minor #32226 [travis] not all components have a master branch (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[travis] not all components have a master branch

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

b73025a4c6 [travis] not all components have a master branch
This commit is contained in:
Fabien Potencier 2019-06-27 18:19:56 +02:00
commit bcc66e3400
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ foreach ($dirs as $k => $dir) {
$versions = @file_get_contents('https://repo.packagist.org/p/'.$package->name.'.json') ?: sprintf('{"packages":{"%s":{"dev-master":%s}}}', $package->name, file_get_contents($dir.'/composer.json'));
$versions = json_decode($versions)->packages->{$package->name};
if ($package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) {
if (isset($versions->{'dev-master'}) && $package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) {
unset($versions->{'dev-master'});
}