2011-09-20 21:34:06 +00:00
< ? php
/*
* This file is part of Composer .
*
* ( c ) Nils Adermann < naderman @ naderman . de >
* Jordi Boggiano < j . boggiano @ seld . be >
*
* For the full copyright and license information , please view the LICENSE
* file that was distributed with this source code .
*/
namespace Composer\Package\Loader ;
2021-03-09 14:49:40 +00:00
use Composer\Package\BasePackage ;
use Composer\Package\CompleteAliasPackage ;
use Composer\Package\CompletePackage ;
use Composer\Package\RootPackage ;
use Composer\Package\PackageInterface ;
use Composer\Package\CompletePackageInterface ;
2015-07-04 02:35:54 +00:00
use Composer\Package\Link ;
2013-04-30 08:37:03 +00:00
use Composer\Package\RootAliasPackage ;
2016-02-24 17:27:42 +00:00
use Composer\Package\Version\VersionParser ;
2011-09-20 21:34:06 +00:00
/**
* @ author Konstantin Kudryashiv < ever . zet @ gmail . com >
2011-09-25 21:58:50 +00:00
* @ author Jordi Boggiano < j . boggiano @ seld . be >
2011-09-20 21:34:06 +00:00
*/
2012-07-18 15:20:01 +00:00
class ArrayLoader implements LoaderInterface
2011-09-20 21:34:06 +00:00
{
2021-10-12 20:47:23 +00:00
/** @var VersionParser */
2011-09-25 21:58:50 +00:00
protected $versionParser ;
2021-10-12 20:47:23 +00:00
/** @var bool */
2014-05-07 16:12:26 +00:00
protected $loadOptions ;
2011-09-25 21:58:50 +00:00
2021-10-25 11:08:05 +00:00
/**
* @ param bool $loadOptions
*/
2018-10-31 11:44:54 +00:00
public function __construct ( VersionParser $parser = null , $loadOptions = false )
2011-09-25 21:58:50 +00:00
{
if ( ! $parser ) {
2011-12-12 20:46:21 +00:00
$parser = new VersionParser ;
2011-09-25 21:58:50 +00:00
}
2011-12-12 20:46:21 +00:00
$this -> versionParser = $parser ;
2014-05-07 16:12:26 +00:00
$this -> loadOptions = $loadOptions ;
2011-09-25 21:58:50 +00:00
}
2021-03-09 14:49:40 +00:00
/**
2021-10-25 11:08:05 +00:00
* @ inheritDoc
2021-03-09 14:49:40 +00:00
*/
2012-08-23 13:52:40 +00:00
public function load ( array $config , $class = 'Composer\Package\CompletePackage' )
2018-12-04 10:20:35 +00:00
{
2021-03-09 14:49:40 +00:00
if ( $class !== 'Composer\Package\CompletePackage' && $class !== 'Composer\Package\RootPackage' ) {
trigger_error ( 'The $class arg is deprecated, please reach out to Composer maintainers ASAP if you still need this.' , E_USER_DEPRECATED );
}
2018-12-04 10:20:35 +00:00
$package = $this -> createObject ( $config , $class );
2021-03-09 14:49:40 +00:00
foreach ( BasePackage :: $supportedLinkTypes as $type => $opts ) {
2018-12-04 10:20:35 +00:00
if ( isset ( $config [ $type ])) {
$method = 'set' . ucfirst ( $opts [ 'method' ]);
$package -> { $method }(
$this -> parseLinks (
$package -> getName (),
$package -> getPrettyVersion (),
2021-08-21 15:41:52 +00:00
$opts [ 'method' ],
2018-12-04 10:20:35 +00:00
$config [ $type ]
)
);
}
}
$package = $this -> configureObject ( $package , $config );
return $package ;
}
2021-03-09 14:49:40 +00:00
/**
2021-10-25 11:08:05 +00:00
* @ param list < array < mixed >> $versions
*
2021-03-09 14:49:40 +00:00
* @ return list < CompletePackage | CompleteAliasPackage >
*/
2021-08-21 15:41:52 +00:00
public function loadPackages ( array $versions )
2018-12-04 10:20:35 +00:00
{
$packages = array ();
$linkCache = array ();
foreach ( $versions as $version ) {
2021-08-21 15:41:52 +00:00
$package = $this -> createObject ( $version , 'Composer\Package\CompletePackage' );
2018-12-04 10:20:35 +00:00
2019-02-20 10:10:44 +00:00
$this -> configureCachedLinks ( $linkCache , $package , $version );
$package = $this -> configureObject ( $package , $version );
2018-12-04 10:20:35 +00:00
2019-02-20 10:10:44 +00:00
$packages [] = $package ;
2018-12-04 10:20:35 +00:00
}
return $packages ;
}
2021-03-09 14:49:40 +00:00
/**
* @ template PackageClass of CompletePackageInterface
2021-10-25 11:08:05 +00:00
*
* @ param mixed [] $config package data
* @ param string $class FQCN to be instantiated
*
2021-03-09 14:49:40 +00:00
* @ return CompletePackage | RootPackage
2021-10-25 11:08:05 +00:00
*
2021-03-09 14:49:40 +00:00
* @ phpstan - param class - string < PackageClass > $class
*/
2018-12-04 10:20:35 +00:00
private function createObject ( array $config , $class )
2011-09-20 21:34:06 +00:00
{
2011-12-12 20:46:21 +00:00
if ( ! isset ( $config [ 'name' ])) {
throw new \UnexpectedValueException ( 'Unknown package has no name defined (' . json_encode ( $config ) . ').' );
}
if ( ! isset ( $config [ 'version' ])) {
throw new \UnexpectedValueException ( 'Package ' . $config [ 'name' ] . ' has no version defined.' );
}
2011-11-20 20:13:17 +00:00
// handle already normalized versions
if ( isset ( $config [ 'version_normalized' ])) {
$version = $config [ 'version_normalized' ];
2020-03-11 12:37:39 +00:00
2020-06-25 06:56:14 +00:00
// handling of existing repos which need to remain composer v1 compatible, in case the version_normalized contained VersionParser::DEFAULT_BRANCH_ALIAS, we renormalize it
if ( $version === VersionParser :: DEFAULT_BRANCH_ALIAS ) {
2020-03-11 12:37:39 +00:00
$version = $this -> versionParser -> normalize ( $config [ 'version' ]);
}
2011-11-20 20:13:17 +00:00
} else {
2011-12-12 20:46:21 +00:00
$version = $this -> versionParser -> normalize ( $config [ 'version' ]);
2011-11-20 20:13:17 +00:00
}
2018-12-04 10:20:35 +00:00
return new $class ( $config [ 'name' ], $version , $config [ 'version' ]);
}
2021-03-09 14:49:40 +00:00
/**
2021-10-25 11:08:05 +00:00
* @ param CompletePackage $package
* @ param mixed [] $config package data
*
2021-03-09 14:49:40 +00:00
* @ return RootPackage | RootAliasPackage | CompletePackage | CompleteAliasPackage
*/
private function configureObject ( PackageInterface $package , array $config )
2018-12-04 10:20:35 +00:00
{
2021-08-21 15:41:52 +00:00
if ( ! $package instanceof CompletePackage ) {
throw new \LogicException ( 'ArrayLoader expects instances of the Composer\Package\CompletePackage class to function correctly' );
2021-03-09 14:49:40 +00:00
}
2011-12-12 20:46:21 +00:00
$package -> setType ( isset ( $config [ 'type' ]) ? strtolower ( $config [ 'type' ]) : 'library' );
2011-09-20 21:34:06 +00:00
2011-10-16 16:52:08 +00:00
if ( isset ( $config [ 'target-dir' ])) {
$package -> setTargetDir ( $config [ 'target-dir' ]);
2011-10-09 14:43:16 +00:00
}
2020-04-30 08:36:17 +00:00
if ( isset ( $config [ 'extra' ]) && \is_array ( $config [ 'extra' ])) {
2011-09-20 21:34:06 +00:00
$package -> setExtra ( $config [ 'extra' ]);
}
2012-04-23 08:14:02 +00:00
if ( isset ( $config [ 'bin' ])) {
2020-12-02 12:55:58 +00:00
if ( ! \is_array ( $config [ 'bin' ])) {
$config [ 'bin' ] = array ( $config [ 'bin' ]);
}
foreach ( $config [ 'bin' ] as $key => $bin ) {
2014-10-17 17:46:01 +00:00
$config [ 'bin' ][ $key ] = ltrim ( $bin , '/' );
2011-12-03 14:39:06 +00:00
}
2020-12-02 12:55:58 +00:00
$package -> setBinaries ( $config [ 'bin' ]);
2011-12-03 14:39:06 +00:00
}
2011-10-30 19:16:41 +00:00
if ( isset ( $config [ 'installation-source' ])) {
$package -> setInstallationSource ( $config [ 'installation-source' ]);
}
2020-06-19 13:08:01 +00:00
if ( isset ( $config [ 'default-branch' ]) && $config [ 'default-branch' ] === true ) {
2020-06-17 14:09:38 +00:00
$package -> setIsDefaultBranch ( true );
}
2011-09-20 21:34:06 +00:00
if ( isset ( $config [ 'source' ])) {
2020-09-11 21:51:55 +00:00
if ( ! isset ( $config [ 'source' ][ 'type' ], $config [ 'source' ][ 'url' ], $config [ 'source' ][ 'reference' ])) {
2011-09-20 21:34:06 +00:00
throw new \UnexpectedValueException ( sprintf (
2013-03-07 08:55:23 +00:00
" Package %s's source key should be specified as { \" type \" : ..., \" url \" : ..., \" reference \" : ...}, \n %s given. " ,
2013-03-06 17:08:55 +00:00
$config [ 'name' ],
2011-09-20 21:34:06 +00:00
json_encode ( $config [ 'source' ])
));
}
$package -> setSourceType ( $config [ 'source' ][ 'type' ]);
$package -> setSourceUrl ( $config [ 'source' ][ 'url' ]);
2019-02-10 11:39:00 +00:00
$package -> setSourceReference ( isset ( $config [ 'source' ][ 'reference' ]) ? $config [ 'source' ][ 'reference' ] : null );
2013-07-01 23:45:43 +00:00
if ( isset ( $config [ 'source' ][ 'mirrors' ])) {
$package -> setSourceMirrors ( $config [ 'source' ][ 'mirrors' ]);
}
2011-09-20 21:34:06 +00:00
}
if ( isset ( $config [ 'dist' ])) {
2020-09-11 21:51:55 +00:00
if ( ! isset ( $config [ 'dist' ][ 'type' ], $config [ 'dist' ][ 'url' ])) {
2011-09-20 21:34:06 +00:00
throw new \UnexpectedValueException ( sprintf (
2013-03-06 17:08:55 +00:00
" Package %s's dist key should be specified as " .
" { \" type \" : ..., \" url \" : ..., \" reference \" : ..., \" shasum \" : ...}, \n %s given. " ,
$config [ 'name' ],
2011-10-27 22:34:59 +00:00
json_encode ( $config [ 'dist' ])
2011-09-20 21:34:06 +00:00
));
}
$package -> setDistType ( $config [ 'dist' ][ 'type' ]);
$package -> setDistUrl ( $config [ 'dist' ][ 'url' ]);
2011-10-27 22:34:59 +00:00
$package -> setDistReference ( isset ( $config [ 'dist' ][ 'reference' ]) ? $config [ 'dist' ][ 'reference' ] : null );
$package -> setDistSha1Checksum ( isset ( $config [ 'dist' ][ 'shasum' ]) ? $config [ 'dist' ][ 'shasum' ] : null );
2013-07-01 23:45:43 +00:00
if ( isset ( $config [ 'dist' ][ 'mirrors' ])) {
$package -> setDistMirrors ( $config [ 'dist' ][ 'mirrors' ]);
}
2011-09-20 21:34:06 +00:00
}
2020-04-30 08:36:17 +00:00
if ( isset ( $config [ 'suggest' ]) && \is_array ( $config [ 'suggest' ])) {
2012-04-20 18:08:38 +00:00
foreach ( $config [ 'suggest' ] as $target => $reason ) {
if ( 'self.version' === trim ( $reason )) {
$config [ 'suggest' ][ $target ] = $package -> getPrettyVersion ();
}
}
2012-04-14 09:55:57 +00:00
$package -> setSuggests ( $config [ 'suggest' ]);
}
2011-10-09 14:43:16 +00:00
if ( isset ( $config [ 'autoload' ])) {
$package -> setAutoload ( $config [ 'autoload' ]);
}
2014-02-27 09:39:33 +00:00
if ( isset ( $config [ 'autoload-dev' ])) {
$package -> setDevAutoload ( $config [ 'autoload-dev' ]);
}
2012-04-08 15:42:57 +00:00
if ( isset ( $config [ 'include-path' ])) {
$package -> setIncludePaths ( $config [ 'include-path' ]);
2012-04-04 07:46:31 +00:00
}
2012-08-23 13:52:40 +00:00
if ( ! empty ( $config [ 'time' ])) {
2015-06-07 08:38:27 +00:00
$time = preg_match ( '/^\d++$/D' , $config [ 'time' ]) ? '@' . $config [ 'time' ] : $config [ 'time' ];
2013-02-19 18:42:59 +00:00
2012-08-23 13:52:40 +00:00
try {
2013-02-19 18:42:59 +00:00
$date = new \DateTime ( $time , new \DateTimeZone ( 'UTC' ));
2012-08-23 13:52:40 +00:00
$package -> setReleaseDate ( $date );
} catch ( \Exception $e ) {
}
}
2012-11-29 08:24:28 +00:00
if ( ! empty ( $config [ 'notification-url' ])) {
$package -> setNotificationUrl ( $config [ 'notification-url' ]);
}
2021-03-09 14:49:40 +00:00
if ( $package instanceof CompletePackageInterface ) {
if ( ! empty ( $config [ 'archive' ][ 'name' ])) {
$package -> setArchiveName ( $config [ 'archive' ][ 'name' ]);
}
if ( ! empty ( $config [ 'archive' ][ 'exclude' ])) {
$package -> setArchiveExcludes ( $config [ 'archive' ][ 'exclude' ]);
}
2013-02-07 14:45:58 +00:00
2020-04-30 08:36:17 +00:00
if ( isset ( $config [ 'scripts' ]) && \is_array ( $config [ 'scripts' ])) {
2012-08-23 13:52:40 +00:00
foreach ( $config [ 'scripts' ] as $event => $listeners ) {
2013-03-07 10:42:47 +00:00
$config [ 'scripts' ][ $event ] = ( array ) $listeners ;
2012-08-23 13:52:40 +00:00
}
2021-11-24 21:30:57 +00:00
foreach ( array ( 'composer' , 'php' , 'putenv' ) as $reserved ) {
if ( isset ( $config [ 'scripts' ][ $reserved ])) {
trigger_error ( 'The `' . $reserved . '` script name is reserved for internal use, please avoid defining it' , E_USER_DEPRECATED );
}
2016-04-11 18:03:32 +00:00
}
2012-08-23 13:52:40 +00:00
$package -> setScripts ( $config [ 'scripts' ]);
}
2020-04-30 08:36:17 +00:00
if ( ! empty ( $config [ 'description' ]) && \is_string ( $config [ 'description' ])) {
2012-08-23 13:52:40 +00:00
$package -> setDescription ( $config [ 'description' ]);
}
2020-04-30 08:36:17 +00:00
if ( ! empty ( $config [ 'homepage' ]) && \is_string ( $config [ 'homepage' ])) {
2012-08-23 13:52:40 +00:00
$package -> setHomepage ( $config [ 'homepage' ]);
}
2020-04-30 08:36:17 +00:00
if ( ! empty ( $config [ 'keywords' ]) && \is_array ( $config [ 'keywords' ])) {
2012-08-23 13:52:40 +00:00
$package -> setKeywords ( $config [ 'keywords' ]);
}
if ( ! empty ( $config [ 'license' ])) {
2020-04-30 08:36:17 +00:00
$package -> setLicense ( \is_array ( $config [ 'license' ]) ? $config [ 'license' ] : array ( $config [ 'license' ]));
2012-08-23 13:52:40 +00:00
}
2020-04-30 08:36:17 +00:00
if ( ! empty ( $config [ 'authors' ]) && \is_array ( $config [ 'authors' ])) {
2012-08-23 13:52:40 +00:00
$package -> setAuthors ( $config [ 'authors' ]);
}
if ( isset ( $config [ 'support' ])) {
$package -> setSupport ( $config [ 'support' ]);
}
2014-10-02 21:04:35 +00:00
2020-04-30 08:36:17 +00:00
if ( ! empty ( $config [ 'funding' ]) && \is_array ( $config [ 'funding' ])) {
2019-11-28 21:34:29 +00:00
$package -> setFunding ( $config [ 'funding' ]);
}
2014-10-02 21:04:35 +00:00
if ( isset ( $config [ 'abandoned' ])) {
$package -> setAbandoned ( $config [ 'abandoned' ]);
}
2012-03-10 09:24:14 +00:00
}
2018-12-04 10:20:35 +00:00
if ( $this -> loadOptions && isset ( $config [ 'transport-options' ])) {
$package -> setTransportOptions ( $config [ 'transport-options' ]);
}
2013-04-01 06:10:15 +00:00
if ( $aliasNormalized = $this -> getBranchAlias ( $config )) {
2020-03-13 12:52:16 +00:00
$prettyAlias = preg_replace ( '{(\.9{7})+}' , '.x' , $aliasNormalized );
2021-08-21 15:41:52 +00:00
if ( $package instanceof RootPackage ) {
2020-03-13 12:52:16 +00:00
return new RootAliasPackage ( $package , $aliasNormalized , $prettyAlias );
2013-04-30 08:37:03 +00:00
}
2013-04-01 06:10:15 +00:00
2021-08-21 15:41:52 +00:00
return new CompleteAliasPackage ( $package , $aliasNormalized , $prettyAlias );
2013-08-19 07:40:08 +00:00
}
2011-09-20 21:34:06 +00:00
return $package ;
}
2021-03-09 14:49:40 +00:00
/**
2021-10-25 11:08:05 +00:00
* @ param array < string , array < string , array < string , array < string , array { string , Link } >>>> $linkCache
* @ param PackageInterface $package
* @ param mixed [] $config
*
2021-03-09 14:49:40 +00:00
* @ return void
*/
2018-12-04 10:20:35 +00:00
private function configureCachedLinks ( & $linkCache , $package , array $config )
{
$name = $package -> getName ();
$prettyVersion = $package -> getPrettyVersion ();
2021-03-09 14:49:40 +00:00
foreach ( BasePackage :: $supportedLinkTypes as $type => $opts ) {
2018-12-04 10:20:35 +00:00
if ( isset ( $config [ $type ])) {
$method = 'set' . ucfirst ( $opts [ 'method' ]);
$links = array ();
foreach ( $config [ $type ] as $prettyTarget => $constraint ) {
$target = strtolower ( $prettyTarget );
2021-11-10 10:07:44 +00:00
// recursive links are not supported
if ( $target === $name ) {
continue ;
}
2018-12-04 10:20:35 +00:00
if ( $constraint === 'self.version' ) {
2021-08-21 15:41:52 +00:00
$links [ $target ] = $this -> createLink ( $name , $prettyVersion , $opts [ 'method' ], $target , $constraint );
2018-12-04 10:20:35 +00:00
} else {
if ( ! isset ( $linkCache [ $name ][ $type ][ $target ][ $constraint ])) {
2021-08-21 15:41:52 +00:00
$linkCache [ $name ][ $type ][ $target ][ $constraint ] = array ( $target , $this -> createLink ( $name , $prettyVersion , $opts [ 'method' ], $target , $constraint ));
2018-12-04 10:20:35 +00:00
}
list ( $target , $link ) = $linkCache [ $name ][ $type ][ $target ][ $constraint ];
$links [ $target ] = $link ;
}
}
$package -> { $method }( $links );
}
}
}
2015-07-04 02:35:54 +00:00
/**
2021-10-25 11:08:05 +00:00
* @ param string $source source package name
* @ param string $sourceVersion source package version ( pretty version ideally )
* @ param string $description link description ( e . g . requires , replaces , .. )
* @ param array < string , string > $links array of package name => constraint mappings
*
2015-07-04 02:35:54 +00:00
* @ return Link []
2021-10-25 11:08:05 +00:00
*
* @ phpstan - param Link :: TYPE_ * $description
2015-07-04 02:35:54 +00:00
*/
public function parseLinks ( $source , $sourceVersion , $description , $links )
{
$res = array ();
foreach ( $links as $target => $constraint ) {
2021-11-12 20:38:08 +00:00
$target = strtolower ( $target );
$res [ $target ] = $this -> createLink ( $source , $sourceVersion , $description , $target , $constraint );
2015-07-04 02:35:54 +00:00
}
return $res ;
}
2021-03-09 14:49:40 +00:00
/**
* @ param string $source source package name
* @ param string $sourceVersion source package version ( pretty version ideally )
* @ param Link :: TYPE_ * $description link description ( e . g . requires , replaces , .. )
* @ param string $target target package name
* @ param string $prettyConstraint constraint string
* @ return Link
*/
2018-12-04 10:20:35 +00:00
private function createLink ( $source , $sourceVersion , $description , $target , $prettyConstraint )
{
2020-04-30 08:36:17 +00:00
if ( ! \is_string ( $prettyConstraint )) {
throw new \UnexpectedValueException ( 'Link constraint in ' . $source . ' ' . $description . ' > ' . $target . ' should be a string, got ' . \gettype ( $prettyConstraint ) . ' (' . var_export ( $prettyConstraint , true ) . ')' );
2018-12-04 10:20:35 +00:00
}
if ( 'self.version' === $prettyConstraint ) {
$parsedConstraint = $this -> versionParser -> parseConstraints ( $sourceVersion );
} else {
$parsedConstraint = $this -> versionParser -> parseConstraints ( $prettyConstraint );
}
return new Link ( $source , $target , $parsedConstraint , $description , $prettyConstraint );
}
2012-08-22 14:35:22 +00:00
/**
* Retrieves a branch alias ( dev - master => 1.0 . x - dev for example ) if it exists
*
2021-10-25 11:08:05 +00:00
* @ param mixed [] $config the entire package config
*
2012-08-22 14:35:22 +00:00
* @ return string | null normalized version of the branch alias or null if there is none
*/
public function getBranchAlias ( array $config )
{
2020-09-07 18:06:55 +00:00
if ( strpos ( $config [ 'version' ], 'dev-' ) !== 0 && '-dev' !== substr ( $config [ 'version' ], - 4 )) {
2021-03-09 14:49:40 +00:00
return null ;
2012-08-22 14:35:22 +00:00
}
2020-04-30 08:36:17 +00:00
if ( isset ( $config [ 'extra' ][ 'branch-alias' ]) && \is_array ( $config [ 'extra' ][ 'branch-alias' ])) {
2020-03-11 12:37:39 +00:00
foreach ( $config [ 'extra' ][ 'branch-alias' ] as $sourceBranch => $targetBranch ) {
// ensure it is an alias to a -dev package
if ( '-dev' !== substr ( $targetBranch , - 4 )) {
continue ;
}
2012-08-22 14:35:22 +00:00
2020-03-11 12:37:39 +00:00
// normalize without -dev and ensure it's a numeric branch that is parseable
2020-11-26 13:24:16 +00:00
if ( $targetBranch === VersionParser :: DEFAULT_BRANCH_ALIAS ) {
$validatedTargetBranch = VersionParser :: DEFAULT_BRANCH_ALIAS ;
} else {
$validatedTargetBranch = $this -> versionParser -> normalizeBranch ( substr ( $targetBranch , 0 , - 4 ));
}
2020-03-11 12:37:39 +00:00
if ( '-dev' !== substr ( $validatedTargetBranch , - 4 )) {
continue ;
}
2012-08-22 14:35:22 +00:00
2020-03-11 12:37:39 +00:00
// ensure that it is the current branch aliasing itself
if ( strtolower ( $config [ 'version' ]) !== strtolower ( $sourceBranch )) {
continue ;
}
2012-08-22 14:35:22 +00:00
2020-03-11 12:37:39 +00:00
// If using numeric aliases ensure the alias is a valid subversion
if (( $sourcePrefix = $this -> versionParser -> parseNumericAliasPrefix ( $sourceBranch ))
&& ( $targetPrefix = $this -> versionParser -> parseNumericAliasPrefix ( $targetBranch ))
&& ( stripos ( $targetPrefix , $sourcePrefix ) !== 0 )
) {
continue ;
}
return $validatedTargetBranch ;
2014-12-01 05:09:35 +00:00
}
2020-03-11 12:37:39 +00:00
}
2014-12-01 05:09:35 +00:00
2021-02-17 22:46:37 +00:00
if (
isset ( $config [ 'default-branch' ])
&& $config [ 'default-branch' ] === true
&& false === $this -> versionParser -> parseNumericAliasPrefix ( $config [ 'version' ])
) {
2020-06-25 06:56:14 +00:00
return VersionParser :: DEFAULT_BRANCH_ALIAS ;
2012-08-22 14:35:22 +00:00
}
2021-03-09 14:49:40 +00:00
return null ;
2012-08-22 14:35:22 +00:00
}
2011-09-20 21:34:06 +00:00
}