Allow Semver VersionParser in input hints
parent
c9436438ff
commit
fff0aed3a6
|
@ -18,6 +18,7 @@ use Composer\Package\Link;
|
|||
use Composer\Package\RootAliasPackage;
|
||||
use Composer\Package\RootPackageInterface;
|
||||
use Composer\Package\Version\VersionParser;
|
||||
use Composer\Semver\VersionParser as SemverVersionParser;
|
||||
|
||||
/**
|
||||
* @author Konstantin Kudryashiv <ever.zet@gmail.com>
|
||||
|
@ -28,7 +29,7 @@ class ArrayLoader implements LoaderInterface
|
|||
protected $versionParser;
|
||||
protected $loadOptions;
|
||||
|
||||
public function __construct(VersionParser $parser = null, $loadOptions = false)
|
||||
public function __construct(SemverVersionParser $parser = null, $loadOptions = false)
|
||||
{
|
||||
if (!$parser) {
|
||||
$parser = new VersionParser;
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Composer\Package\Version;
|
|||
use Composer\Config;
|
||||
use Composer\Repository\Vcs\HgDriver;
|
||||
use Composer\IO\NullIO;
|
||||
use Composer\Package\Version\VersionParser;
|
||||
use Composer\Semver\VersionParser as SemverVersionParser;
|
||||
use Composer\Util\Git as GitUtil;
|
||||
use Composer\Util\ProcessExecutor;
|
||||
use Composer\Util\Svn as SvnUtil;
|
||||
|
@ -39,16 +39,16 @@ class VersionGuesser
|
|||
private $process;
|
||||
|
||||
/**
|
||||
* @var VersionParser
|
||||
* @var SemverVersionParser
|
||||
*/
|
||||
private $versionParser;
|
||||
|
||||
/**
|
||||
* @param Config $config
|
||||
* @param ProcessExecutor $process
|
||||
* @param VersionParser $versionParser
|
||||
* @param SemverVersionParser $versionParser
|
||||
*/
|
||||
public function __construct(Config $config, ProcessExecutor $process, VersionParser $versionParser)
|
||||
public function __construct(Config $config, ProcessExecutor $process, SemverVersionParser $versionParser)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->process = $process;
|
||||
|
|
|
@ -17,7 +17,6 @@ use Composer\Package\BasePackage;
|
|||
use Composer\Package\PackageInterface;
|
||||
use Composer\Package\Loader\ArrayLoader;
|
||||
use Composer\Package\Dumper\ArrayDumper;
|
||||
use Composer\Package\Version\VersionParser;
|
||||
use Composer\Semver\Semver;
|
||||
use Composer\Semver\Constraint\Constraint;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
namespace Composer\Repository;
|
||||
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Semver\VersionParser as SemverVersionParser;
|
||||
use Composer\Package\Version\VersionParser;
|
||||
use Composer\Repository\Pear\ChannelReader;
|
||||
use Composer\Package\CompletePackage;
|
||||
|
@ -94,10 +95,10 @@ class PearRepository extends ArrayRepository implements ConfigurableRepositoryIn
|
|||
* Builds CompletePackages from PEAR package definition data.
|
||||
*
|
||||
* @param ChannelInfo $channelInfo
|
||||
* @param VersionParser $versionParser
|
||||
* @param SemverVersionParser $versionParser
|
||||
* @return CompletePackage
|
||||
*/
|
||||
private function buildComposerPackages(ChannelInfo $channelInfo, VersionParser $versionParser)
|
||||
private function buildComposerPackages(ChannelInfo $channelInfo, SemverVersionParser $versionParser)
|
||||
{
|
||||
$result = array();
|
||||
foreach ($channelInfo->getPackages() as $packageDefinition) {
|
||||
|
|
Loading…
Reference in New Issue