Composer API
Class

Composer\Package\Version\VersionGuesser

class VersionGuesser

Try to guess the current version number based on different VCS configuration.

Methods

__construct(Config $config, ProcessExecutor $process, VersionParser $versionParser)

null|array guessVersion(array $packageConfig, string $path)

Details

at line 51
public __construct(Config $config, ProcessExecutor $process, VersionParser $versionParser)

Parameters

Config $config
ProcessExecutor $process
VersionParser $versionParser

at line 64
public null|array guessVersion(array $packageConfig, string $path)

Parameters

array $packageConfig
string $path Path to guess into

Return Value

null|array versionData, 'version', 'pretty_version' and 'commit' keys