diff --git a/CHANGELOG.md b/CHANGELOG.md index d78b8e109..bb6cb15c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -113,7 +113,7 @@ ### 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 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 ` **Tip:** See [ssl context options](http://www.php.net/manual/en/context.ssl.php) for more information. -### 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 and then you will be asked whether you want to store it. diff --git a/doc/articles/http-basic-authentication.md b/doc/articles/http-basic-authentication.md index 2119513ce..4e53c36f1 100644 --- a/doc/articles/http-basic-authentication.md +++ b/doc/articles/http-basic-authentication.md @@ -55,5 +55,5 @@ username/password pairs, for example: 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, -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. diff --git a/res/composer-schema.json b/res/composer-schema.json index ac84d5eb0..6c7492c8f 100644 --- a/res/composer-schema.json +++ b/res/composer-schema.json @@ -289,7 +289,7 @@ }, "prefer-stable": { "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": { "type": ["array"], diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 6f2a1dab6..7b36528f6 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -272,9 +272,9 @@ EOT $matches[$index] = $package->getId(); } - // select prefered package according to policy rules - if (!$matchedPackage && $matches && $prefered = $policy->selectPreferedPackages($pool, array(), $matches)) { - $matchedPackage = $pool->literalToPackage($prefered[0]); + // select preferred package according to policy rules + if (!$matchedPackage && $matches && $preferred = $policy->selectPreferredPackages($pool, array(), $matches)) { + $matchedPackage = $pool->literalToPackage($preferred[0]); } return array($matchedPackage, $versions); diff --git a/src/Composer/DependencyResolver/DefaultPolicy.php b/src/Composer/DependencyResolver/DefaultPolicy.php index 5ae6b2c31..2ebe95454 100644 --- a/src/Composer/DependencyResolver/DefaultPolicy.php +++ b/src/Composer/DependencyResolver/DefaultPolicy.php @@ -62,7 +62,7 @@ class DefaultPolicy implements PolicyInterface 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); diff --git a/src/Composer/DependencyResolver/PolicyInterface.php b/src/Composer/DependencyResolver/PolicyInterface.php index e7aaaa724..433478920 100644 --- a/src/Composer/DependencyResolver/PolicyInterface.php +++ b/src/Composer/DependencyResolver/PolicyInterface.php @@ -21,5 +21,5 @@ interface PolicyInterface { public function versionCompare(PackageInterface $a, PackageInterface $b, $operator); 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); } diff --git a/src/Composer/DependencyResolver/Solver.php b/src/Composer/DependencyResolver/Solver.php index 77a945f20..6975df2cd 100644 --- a/src/Composer/DependencyResolver/Solver.php +++ b/src/Composer/DependencyResolver/Solver.php @@ -329,7 +329,7 @@ class Solver private function selectAndInstall($level, array $decisionQueue, $disableRules, Rule $rule) { // 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); diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index 89ecd0643..7333d0d10 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -832,8 +832,8 @@ class Installer $matches[$index] = $match->getId(); } - // select prefered package according to policy rules - if ($matches && $matches = $policy->selectPreferedPackages($pool, array(), $matches)) { + // select preferred package according to policy rules + if ($matches && $matches = $policy->selectPreferredPackages($pool, array(), $matches)) { $newPackage = $pool->literalToPackage($matches[0]); 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 * @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 * @return Installer diff --git a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php index f06ba4437..993cbffe8 100644 --- a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php +++ b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php @@ -46,7 +46,7 @@ class DefaultPolicyTest extends TestCase $literals = 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); } @@ -60,7 +60,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA1->getId(), $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); } @@ -74,7 +74,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA1->getId(), $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); } @@ -89,7 +89,7 @@ class DefaultPolicyTest extends TestCase $expected = array($packageA1->getId()); $policy = new DefaultPolicy(true); - $selected = $policy->selectPreferedPackages($this->pool, array(), $literals); + $selected = $policy->selectPreferredPackages($this->pool, array(), $literals); $this->assertEquals($expected, $selected); } @@ -103,7 +103,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA1->getId(), $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); } @@ -118,7 +118,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA->getId(), $packageAInstalled->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); } @@ -137,7 +137,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA->getId(), $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); } @@ -166,7 +166,7 @@ class DefaultPolicyTest extends TestCase $expected = array($packageAAliasImportant->getId()); - $selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals); + $selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals); $this->assertEquals($expected, $selected); } @@ -184,7 +184,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA->getId(), $packageB->getId()); $expected = $literals; - $selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals); + $selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals); $this->assertEquals($expected, $selected); } @@ -201,7 +201,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA->getId(), $packageB->getId()); $expected = $literals; - $selected = $this->policy->selectPreferedPackages($this->pool, array(), $literals); + $selected = $this->policy->selectPreferredPackages($this->pool, array(), $literals); $this->assertEquals($expected, $selected); } @@ -220,7 +220,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA->getId(), $packageB->getId()); $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); // test with reversed order in repo @@ -234,7 +234,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA->getId(), $packageB->getId()); $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); } @@ -259,7 +259,7 @@ class DefaultPolicyTest extends TestCase $literals = array($packageA1->getId(), $packageA2->getId()); $expected = array($packageA1->getId()); - $selected = $policy->selectPreferedPackages($this->pool, array(), $literals); + $selected = $policy->selectPreferredPackages($this->pool, array(), $literals); $this->assertEquals($expected, $selected); }