dev/src/ReleaseBuilder/ReleaseBuilder.php
private function determineUmbrellaLevel(array $release)
    {
        $levels = [];
        array_walk($release, function ($component) use (&$levels) {
            $levels[] = $component['level'];
        });

        $levels = array_unique($levels);
        rsort($levels);

        // Since we don't use major versions of the umbrella, major versions of
        // components only bump the umbrella by a minor increment.
        if ($levels[0] === self::LEVEL_MAJOR) {
            $levels[0] = self::LEVEL_MINOR;
        }

        $release[self::DEFAULT_COMPONENT] = [
            'level' => $levels[0]
        ];

        return $release;
    }
private function determineUmbrellaLevel(array $release)
    {
        $levels = [];
        array_walk($release, function ($component) use (&$levels) {
            $levels[] = $component['level'];
        });

        $levels = array_unique($levels);
        rsort($levels);

        // Since we don't use major versions of the umbrella, major versions of
        // components only bump the umbrella by a minor increment.
        if ($levels[0] === self::LEVEL_MAJOR) {
            $levels[0] = self::LEVEL_MINOR;
        }

        $release[self::DEFAULT_COMPONENT] = [
            'level' => $levels[0]
        ];

        return $release;
    }
private function determineUmbrellaLevel ( array $ release ) { $ levels = [ ] ; array_walk ( $ release , function ( $ component ) use ( & $ levels ) { $ levels [ ] = $ component [ 'level' ] ; } ) ; $ levels = array_unique ( $ levels ) ; rsort ( $ levels ) ; // Since we don't use major versions of the umbrella, major versions of // components only bump the umbrella by a minor increment. if ( $ levels [ 0 ] === self :: LEVEL_MAJOR ) { $ levels [ 0 ] = self :: LEVEL_MINOR ; } $ release [ self :: DEFAULT_COMPONENT ] = [ 'level' => $ levels [ 0 ] ] ; return $ release ; }
Determine the release level of the umbrella package by examining the
levels of all affected components and incrementing the umbrella by the
highest level of a component release.

In other words, if three components are released as patches, the umbrella
will be a patch release. If there are any minor releases, the umbrella is
released as a minor. The umbrella package will never be incrememted as a
major release.

@param array $release An associative array, where the key is the
component ID and the value is structured data describing the
release.
@return array $release
Determine the release level of the umbrella package by examining the levels of all affected components and incrementing the umbrella by the highest level of a component release .