Merge remote-tracking branch 'isoroku/fix-misspellings'
Conflicts: doc/articles/handling-private-packages-with-satis.mdpull/3789/merge
commit
6b3178b169
|
@ -137,7 +137,7 @@
|
||||||
### 1.0.0-alpha6 (2012-10-23)
|
### 1.0.0-alpha6 (2012-10-23)
|
||||||
|
|
||||||
* Schema: Added ability to pass additional options to repositories (i.e. ssh keys/client certificates to secure private repos)
|
* Schema: Added ability to pass additional options to repositories (i.e. ssh keys/client certificates to secure private repos)
|
||||||
* Schema: Added a new `~` operator that should be prefered over `>=`, see http://getcomposer.org/doc/01-basic-usage.md#package-versions
|
* Schema: Added a new `~` operator that should be preferred over `>=`, see http://getcomposer.org/doc/01-basic-usage.md#package-versions
|
||||||
* Schema: Version constraints `<x.y` are assumed to be `<x.y-dev` unless specified as `<x.y-stable` to reduce confusion
|
* Schema: Version constraints `<x.y` are assumed to be `<x.y-dev` unless specified as `<x.y-stable` to reduce confusion
|
||||||
* Added `config` command to edit/list config values, including --global switch for system config
|
* Added `config` command to edit/list config values, including --global switch for system config
|
||||||
* Added OAuth token support for the GitHub API
|
* Added OAuth token support for the GitHub API
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
* Added --prefer-dist flag to force installs of dev packages from zip archives instead of clones
|
* Added --prefer-dist flag to force installs of dev packages from zip archives instead of clones
|
||||||
* Added --working-dir (-d) flag to change the working directory
|
* Added --working-dir (-d) flag to change the working directory
|
||||||
* Added --profile flag to all commands to display execution time and memory usage
|
* Added --profile flag to all commands to display execution time and memory usage
|
||||||
* Added `github-protocols` config key to define the order of prefered protocols for github.com clones
|
* Added `github-protocols` config key to define the order of preferred protocols for github.com clones
|
||||||
* Added ability to interactively reset changes to vendor dirs while updating
|
* Added ability to interactively reset changes to vendor dirs while updating
|
||||||
* Added support for hg bookmarks in the hg driver
|
* Added support for hg bookmarks in the hg driver
|
||||||
* Added support for svn repositories not following the standard trunk/branch/tags scheme
|
* Added support for svn repositories not following the standard trunk/branch/tags scheme
|
||||||
|
|
|
@ -177,9 +177,9 @@ Example using a custom HTTP Header field for token authentication:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Authentification
|
### Authentication
|
||||||
|
|
||||||
When your private repositories are password protected, you can store the authentification details permanently.
|
When your private repositories are password protected, you can store the authentication details permanently.
|
||||||
The first time Composer needs to authenticate against some domain it will prompt you for a username/password
|
The first time Composer needs to authenticate against some domain it will prompt you for a username/password
|
||||||
and then you will be asked whether you want to store it.
|
and then you will be asked whether you want to store it.
|
||||||
|
|
||||||
|
|
|
@ -55,5 +55,5 @@ username/password pairs, for example:
|
||||||
|
|
||||||
The main advantage of the auth.json file is that it can be gitignored so
|
The main advantage of the auth.json file is that it can be gitignored so
|
||||||
that every developer in your team can place their own credentials in there,
|
that every developer in your team can place their own credentials in there,
|
||||||
which makes revokation of credentials much easier than if you all share the
|
which makes revocation of credentials much easier than if you all share the
|
||||||
same.
|
same.
|
||||||
|
|
|
@ -289,7 +289,7 @@
|
||||||
},
|
},
|
||||||
"prefer-stable": {
|
"prefer-stable": {
|
||||||
"type": ["boolean"],
|
"type": ["boolean"],
|
||||||
"description": "If set to true, stable packages will be prefered to dev packages when possible, even if the minimum-stability allows unstable packages."
|
"description": "If set to true, stable packages will be preferred to dev packages when possible, even if the minimum-stability allows unstable packages."
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"type": ["array"],
|
"type": ["array"],
|
||||||
|
|
|
@ -273,9 +273,9 @@ EOT
|
||||||
$matches[$index] = $package->getId();
|
$matches[$index] = $package->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
// select prefered package according to policy rules
|
// select preferred package according to policy rules
|
||||||
if (!$matchedPackage && $matches && $prefered = $policy->selectPreferedPackages($pool, array(), $matches)) {
|
if (!$matchedPackage && $matches && $preferred = $policy->selectPreferredPackages($pool, array(), $matches)) {
|
||||||
$matchedPackage = $pool->literalToPackage($prefered[0]);
|
$matchedPackage = $pool->literalToPackage($preferred[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($matchedPackage, $versions);
|
return array($matchedPackage, $versions);
|
||||||
|
|
|
@ -62,7 +62,7 @@ class DefaultPolicy implements PolicyInterface
|
||||||
return $pool->getPriority($package->getRepository());
|
return $pool->getPriority($package->getRepository());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function selectPreferedPackages(Pool $pool, array $installedMap, array $literals, $requiredPackage = null)
|
public function selectPreferredPackages(Pool $pool, array $installedMap, array $literals, $requiredPackage = null)
|
||||||
{
|
{
|
||||||
$packages = $this->groupLiteralsByNamePreferInstalled($pool, $installedMap, $literals);
|
$packages = $this->groupLiteralsByNamePreferInstalled($pool, $installedMap, $literals);
|
||||||
|
|
||||||
|
|
|
@ -21,5 +21,5 @@ interface PolicyInterface
|
||||||
{
|
{
|
||||||
public function versionCompare(PackageInterface $a, PackageInterface $b, $operator);
|
public function versionCompare(PackageInterface $a, PackageInterface $b, $operator);
|
||||||
public function findUpdatePackages(Pool $pool, array $installedMap, PackageInterface $package);
|
public function findUpdatePackages(Pool $pool, array $installedMap, PackageInterface $package);
|
||||||
public function selectPreferedPackages(Pool $pool, array $installedMap, array $literals);
|
public function selectPreferredPackages(Pool $pool, array $installedMap, array $literals);
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,7 +329,7 @@ class Solver
|
||||||
private function selectAndInstall($level, array $decisionQueue, $disableRules, Rule $rule)
|
private function selectAndInstall($level, array $decisionQueue, $disableRules, Rule $rule)
|
||||||
{
|
{
|
||||||
// choose best package to install from decisionQueue
|
// choose best package to install from decisionQueue
|
||||||
$literals = $this->policy->selectPreferedPackages($this->pool, $this->installedMap, $decisionQueue, $rule->getRequiredPackage());
|
$literals = $this->policy->selectPreferredPackages($this->pool, $this->installedMap, $decisionQueue, $rule->getRequiredPackage());
|
||||||
|
|
||||||
$selectedLiteral = array_shift($literals);
|
$selectedLiteral = array_shift($literals);
|
||||||
|
|
||||||
|
|
|
@ -832,8 +832,8 @@ class Installer
|
||||||
$matches[$index] = $match->getId();
|
$matches[$index] = $match->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
// select prefered package according to policy rules
|
// select preferred package according to policy rules
|
||||||
if ($matches && $matches = $policy->selectPreferedPackages($pool, array(), $matches)) {
|
if ($matches && $matches = $policy->selectPreferredPackages($pool, array(), $matches)) {
|
||||||
$newPackage = $pool->literalToPackage($matches[0]);
|
$newPackage = $pool->literalToPackage($matches[0]);
|
||||||
|
|
||||||
if ($task === 'force-links' && $newPackage) {
|
if ($task === 'force-links' && $newPackage) {
|
||||||
|
@ -1281,7 +1281,7 @@ class Installer
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should packages be prefered in a stable version when updating?
|
* Should packages be preferred in a stable version when updating?
|
||||||
*
|
*
|
||||||
* @param boolean $preferStable
|
* @param boolean $preferStable
|
||||||
* @return Installer
|
* @return Installer
|
||||||
|
@ -1294,7 +1294,7 @@ class Installer
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should packages be prefered in a lowest version when updating?
|
* Should packages be preferred in a lowest version when updating?
|
||||||
*
|
*
|
||||||
* @param boolean $preferLowest
|
* @param boolean $preferLowest
|
||||||
* @return Installer
|
* @return Installer
|
||||||
|
|
|
@ -46,7 +46,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA->getId());
|
$literals = array($packageA->getId());
|
||||||
$expected = array($packageA->getId());
|
$expected = array($packageA->getId());
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA1->getId(), $packageA2->getId());
|
$literals = array($packageA1->getId(), $packageA2->getId());
|
||||||
$expected = array($packageA2->getId());
|
$expected = array($packageA2->getId());
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA1->getId(), $packageA2->getId());
|
$literals = array($packageA1->getId(), $packageA2->getId());
|
||||||
$expected = array($packageA2->getId());
|
$expected = array($packageA2->getId());
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$expected = array($packageA1->getId());
|
$expected = array($packageA1->getId());
|
||||||
|
|
||||||
$policy = new DefaultPolicy(true);
|
$policy = new DefaultPolicy(true);
|
||||||
$selected = $policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA1->getId(), $packageA2->getId());
|
$literals = array($packageA1->getId(), $packageA2->getId());
|
||||||
$expected = array($packageA2->getId());
|
$expected = array($packageA2->getId());
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA->getId(), $packageAInstalled->getId());
|
$literals = array($packageA->getId(), $packageAInstalled->getId());
|
||||||
$expected = array($packageA->getId());
|
$expected = array($packageA->getId());
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, $this->mapFromRepo($this->repoInstalled), $literals);
|
$selected = $this->policy->selectPreferredPackages($this->pool, $this->mapFromRepo($this->repoInstalled), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA->getId(), $packageAImportant->getId());
|
$literals = array($packageA->getId(), $packageAImportant->getId());
|
||||||
$expected = array($packageAImportant->getId());
|
$expected = array($packageAImportant->getId());
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
|
|
||||||
$expected = array($packageAAliasImportant->getId());
|
$expected = array($packageAAliasImportant->getId());
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA->getId(), $packageB->getId());
|
$literals = array($packageA->getId(), $packageB->getId());
|
||||||
$expected = $literals;
|
$expected = $literals;
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA->getId(), $packageB->getId());
|
$literals = array($packageA->getId(), $packageB->getId());
|
||||||
$expected = $literals;
|
$expected = $literals;
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA->getId(), $packageB->getId());
|
$literals = array($packageA->getId(), $packageB->getId());
|
||||||
$expected = $literals;
|
$expected = $literals;
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals, 'vendor-a/package');
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals, 'vendor-a/package');
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
|
|
||||||
// test with reversed order in repo
|
// test with reversed order in repo
|
||||||
|
@ -234,7 +234,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA->getId(), $packageB->getId());
|
$literals = array($packageA->getId(), $packageB->getId());
|
||||||
$expected = $literals;
|
$expected = $literals;
|
||||||
|
|
||||||
$selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals, 'vendor-a/package');
|
$selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals, 'vendor-a/package');
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ class DefaultPolicyTest extends TestCase
|
||||||
$literals = array($packageA1->getId(), $packageA2->getId());
|
$literals = array($packageA1->getId(), $packageA2->getId());
|
||||||
$expected = array($packageA1->getId());
|
$expected = array($packageA1->getId());
|
||||||
|
|
||||||
$selected = $policy->selectPreferedPackages($this->pool, array(), $literals);
|
$selected = $policy->selectPreferredPackages($this->pool, array(), $literals);
|
||||||
|
|
||||||
$this->assertEquals($expected, $selected);
|
$this->assertEquals($expected, $selected);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue