Merge remote-tracking branch 'CupOfTea696/master'
commit
a72ef947d4
|
@ -141,6 +141,10 @@ class RootPackageLoader extends ArrayLoader
|
||||||
$realPackage->setPreferStable((bool) $config['prefer-stable']);
|
$realPackage->setPreferStable((bool) $config['prefer-stable']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($config['config'])) {
|
||||||
|
$realPackage->setConfig($config['config']);
|
||||||
|
}
|
||||||
|
|
||||||
$repos = RepositoryFactory::defaultRepos(null, $this->config, $this->manager);
|
$repos = RepositoryFactory::defaultRepos(null, $this->config, $this->manager);
|
||||||
foreach ($repos as $repo) {
|
foreach ($repos as $repo) {
|
||||||
$this->manager->addRepository($repo);
|
$this->manager->addRepository($repo);
|
||||||
|
|
|
@ -62,6 +62,22 @@ class RootAliasPackage extends AliasPackage implements RootPackageInterface
|
||||||
return $this->aliasOf->getPreferStable();
|
return $this->aliasOf->getPreferStable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function getConfig()
|
||||||
|
{
|
||||||
|
return $this->aliasOf->getConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function getScripts()
|
||||||
|
{
|
||||||
|
return $this->aliasOf->getScripts();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -22,6 +22,8 @@ class RootPackage extends CompletePackage implements RootPackageInterface
|
||||||
protected $minimumStability = 'stable';
|
protected $minimumStability = 'stable';
|
||||||
protected $preferStable = false;
|
protected $preferStable = false;
|
||||||
protected $stabilityFlags = array();
|
protected $stabilityFlags = array();
|
||||||
|
protected $config = array();
|
||||||
|
protected $scripts = array();
|
||||||
protected $references = array();
|
protected $references = array();
|
||||||
protected $aliases = array();
|
protected $aliases = array();
|
||||||
|
|
||||||
|
@ -79,6 +81,42 @@ class RootPackage extends CompletePackage implements RootPackageInterface
|
||||||
return $this->preferStable;
|
return $this->preferStable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the config
|
||||||
|
*
|
||||||
|
* @param array $config
|
||||||
|
*/
|
||||||
|
public function setConfig(array $config)
|
||||||
|
{
|
||||||
|
$this->config = $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function getConfig()
|
||||||
|
{
|
||||||
|
return $this->config;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the scripts
|
||||||
|
*
|
||||||
|
* @param array $scripts
|
||||||
|
*/
|
||||||
|
public function setScripts(array $scripts)
|
||||||
|
{
|
||||||
|
$this->scripts = $scripts;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function getScripts()
|
||||||
|
{
|
||||||
|
return $this->scripts;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the references
|
* Set the references
|
||||||
*
|
*
|
||||||
|
|
|
@ -58,6 +58,20 @@ interface RootPackageInterface extends CompletePackageInterface
|
||||||
*/
|
*/
|
||||||
public function getPreferStable();
|
public function getPreferStable();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the root package's configuration
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the root package's scripts
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getScripts();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the required packages
|
* Set the required packages
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue