mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Add void types where no return statement is present
This commit is contained in:
parent
32852304d0
commit
abdc6893a6
213 changed files with 1129 additions and 1130 deletions
|
@ -41,7 +41,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->policy = new DefaultPolicy;
|
||||
}
|
||||
|
||||
public function testSelectSingle()
|
||||
public function testSelectSingle(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repositorySet->addRepository($this->repo);
|
||||
|
@ -56,7 +56,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testSelectNewest()
|
||||
public function testSelectNewest(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA1 = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageA2 = $this->getPackage('A', '2.0'));
|
||||
|
@ -72,7 +72,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testSelectNewestPicksLatest()
|
||||
public function testSelectNewestPicksLatest(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA1 = $this->getPackage('A', '1.0.0'));
|
||||
$this->repo->addPackage($packageA2 = $this->getPackage('A', '1.0.1-alpha'));
|
||||
|
@ -88,7 +88,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testSelectNewestPicksLatestStableWithPreferStable()
|
||||
public function testSelectNewestPicksLatestStableWithPreferStable(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA1 = $this->getPackage('A', '1.0.0'));
|
||||
$this->repo->addPackage($packageA2 = $this->getPackage('A', '1.0.1-alpha'));
|
||||
|
@ -105,7 +105,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testSelectNewestWithDevPicksNonDev()
|
||||
public function testSelectNewestWithDevPicksNonDev(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA1 = $this->getPackage('A', 'dev-foo'));
|
||||
$this->repo->addPackage($packageA2 = $this->getPackage('A', '1.0.0'));
|
||||
|
@ -121,7 +121,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testRepositoryOrderingAffectsPriority()
|
||||
public function testRepositoryOrderingAffectsPriority(): void
|
||||
{
|
||||
$repo1 = new ArrayRepository;
|
||||
$repo2 = new ArrayRepository;
|
||||
|
@ -154,7 +154,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testSelectLocalReposFirst()
|
||||
public function testSelectLocalReposFirst(): void
|
||||
{
|
||||
$repoImportant = new ArrayRepository;
|
||||
|
||||
|
@ -185,7 +185,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testSelectAllProviders()
|
||||
public function testSelectAllProviders(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '2.0'));
|
||||
|
@ -205,7 +205,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testPreferNonReplacingFromSameRepo()
|
||||
public function testPreferNonReplacingFromSameRepo(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '2.0'));
|
||||
|
@ -224,7 +224,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testPreferReplacingPackageFromSameVendor()
|
||||
public function testPreferReplacingPackageFromSameVendor(): void
|
||||
{
|
||||
// test with default order
|
||||
$this->repo->addPackage($packageB = $this->getPackage('vendor-b/replacer', '1.0'));
|
||||
|
@ -260,7 +260,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->assertSame($expected, $selected);
|
||||
}
|
||||
|
||||
public function testSelectLowest()
|
||||
public function testSelectLowest(): void
|
||||
{
|
||||
$policy = new DefaultPolicy(false, true);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class PoolBuilderTest extends TestCase
|
|||
* @param mixed[] $packageRepos
|
||||
* @param mixed[] $fixed
|
||||
*/
|
||||
public function testPoolBuilder($file, $message, $expect, $expectOptimized, $root, $requestData, $packageRepos, $fixed)
|
||||
public function testPoolBuilder($file, $message, $expect, $expectOptimized, $root, $requestData, $packageRepos, $fixed): void
|
||||
{
|
||||
$rootAliases = !empty($root['aliases']) ? $root['aliases'] : array();
|
||||
$minimumStability = !empty($root['minimum-stability']) ? $root['minimum-stability'] : 'stable';
|
||||
|
|
|
@ -34,7 +34,7 @@ class PoolOptimizerTest extends TestCase
|
|||
* @param BasePackage[] $expectedPackages
|
||||
* @param string $message
|
||||
*/
|
||||
public function testPoolOptimizer(array $requestData, array $packagesBefore, array $expectedPackages, $message)
|
||||
public function testPoolOptimizer(array $requestData, array $packagesBefore, array $expectedPackages, $message): void
|
||||
{
|
||||
$lockedRepo = new LockArrayRepository();
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ use Composer\Test\TestCase;
|
|||
|
||||
class PoolTest extends TestCase
|
||||
{
|
||||
public function testPool()
|
||||
public function testPool(): void
|
||||
{
|
||||
$package = $this->getPackage('foo', '1');
|
||||
|
||||
|
@ -27,7 +27,7 @@ class PoolTest extends TestCase
|
|||
$this->assertEquals(array($package), $pool->whatProvides('foo'));
|
||||
}
|
||||
|
||||
public function testWhatProvidesPackageWithConstraint()
|
||||
public function testWhatProvidesPackageWithConstraint(): void
|
||||
{
|
||||
$firstPackage = $this->getPackage('foo', '1');
|
||||
$secondPackage = $this->getPackage('foo', '2');
|
||||
|
@ -41,7 +41,7 @@ class PoolTest extends TestCase
|
|||
$this->assertEquals(array($secondPackage), $pool->whatProvides('foo', $this->getVersionConstraint('==', '2')));
|
||||
}
|
||||
|
||||
public function testPackageById()
|
||||
public function testPackageById(): void
|
||||
{
|
||||
$package = $this->getPackage('foo', '1');
|
||||
|
||||
|
@ -50,7 +50,7 @@ class PoolTest extends TestCase
|
|||
$this->assertSame($package, $pool->packageById(1));
|
||||
}
|
||||
|
||||
public function testWhatProvidesWhenPackageCannotBeFound()
|
||||
public function testWhatProvidesWhenPackageCannotBeFound(): void
|
||||
{
|
||||
$pool = $this->createPool();
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ use Composer\Test\TestCase;
|
|||
|
||||
class RequestTest extends TestCase
|
||||
{
|
||||
public function testRequestInstall()
|
||||
public function testRequestInstall(): void
|
||||
{
|
||||
$repo = new ArrayRepository;
|
||||
$foo = $this->getPackage('foo', '1');
|
||||
|
@ -41,7 +41,7 @@ class RequestTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testRequestInstallSamePackageFromDifferentRepositories()
|
||||
public function testRequestInstallSamePackageFromDifferentRepositories(): void
|
||||
{
|
||||
$repo1 = new ArrayRepository;
|
||||
$repo2 = new ArrayRepository;
|
||||
|
|
|
@ -43,7 +43,7 @@ class RuleSetIteratorTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testForeach()
|
||||
public function testForeach(): void
|
||||
{
|
||||
$ruleSetIterator = new RuleSetIterator($this->rules);
|
||||
|
||||
|
@ -61,7 +61,7 @@ class RuleSetIteratorTest extends TestCase
|
|||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
public function testKeys()
|
||||
public function testKeys(): void
|
||||
{
|
||||
$ruleSetIterator = new RuleSetIterator($this->rules);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ use Composer\Test\TestCase;
|
|||
|
||||
class RuleSetTest extends TestCase
|
||||
{
|
||||
public function testAdd()
|
||||
public function testAdd(): void
|
||||
{
|
||||
$rules = array(
|
||||
RuleSet::TYPE_PACKAGE => array(),
|
||||
|
@ -44,7 +44,7 @@ class RuleSetTest extends TestCase
|
|||
$this->assertEquals($rules, $ruleSet->getRules());
|
||||
}
|
||||
|
||||
public function testAddIgnoresDuplicates()
|
||||
public function testAddIgnoresDuplicates(): void
|
||||
{
|
||||
$rules = array(
|
||||
RuleSet::TYPE_REQUEST => array(
|
||||
|
@ -63,7 +63,7 @@ class RuleSetTest extends TestCase
|
|||
$this->assertCount(1, $ruleSet->getIteratorFor(array(RuleSet::TYPE_REQUEST)));
|
||||
}
|
||||
|
||||
public function testAddWhenTypeIsNotRecognized()
|
||||
public function testAddWhenTypeIsNotRecognized(): void
|
||||
{
|
||||
$ruleSet = new RuleSet;
|
||||
|
||||
|
@ -72,7 +72,7 @@ class RuleSetTest extends TestCase
|
|||
$ruleSet->add(new GenericRule(array(), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint)), 7);
|
||||
}
|
||||
|
||||
public function testCount()
|
||||
public function testCount(): void
|
||||
{
|
||||
$ruleSet = new RuleSet;
|
||||
|
||||
|
@ -82,7 +82,7 @@ class RuleSetTest extends TestCase
|
|||
$this->assertEquals(2, $ruleSet->count());
|
||||
}
|
||||
|
||||
public function testRuleById()
|
||||
public function testRuleById(): void
|
||||
{
|
||||
$ruleSet = new RuleSet;
|
||||
|
||||
|
@ -92,7 +92,7 @@ class RuleSetTest extends TestCase
|
|||
$this->assertSame($rule, $ruleSet->ruleById[0]);
|
||||
}
|
||||
|
||||
public function testGetIterator()
|
||||
public function testGetIterator(): void
|
||||
{
|
||||
$ruleSet = new RuleSet;
|
||||
|
||||
|
@ -108,7 +108,7 @@ class RuleSetTest extends TestCase
|
|||
$this->assertSame($rule2, $iterator->current());
|
||||
}
|
||||
|
||||
public function testGetIteratorFor()
|
||||
public function testGetIteratorFor(): void
|
||||
{
|
||||
$ruleSet = new RuleSet;
|
||||
$rule1 = new GenericRule(array(1), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
|
@ -122,7 +122,7 @@ class RuleSetTest extends TestCase
|
|||
$this->assertSame($rule2, $iterator->current());
|
||||
}
|
||||
|
||||
public function testGetIteratorWithout()
|
||||
public function testGetIteratorWithout(): void
|
||||
{
|
||||
$ruleSet = new RuleSet;
|
||||
$rule1 = new GenericRule(array(1), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
|
@ -136,7 +136,7 @@ class RuleSetTest extends TestCase
|
|||
$this->assertSame($rule2, $iterator->current());
|
||||
}
|
||||
|
||||
public function testPrettyString()
|
||||
public function testPrettyString(): void
|
||||
{
|
||||
$pool = new Pool(array(
|
||||
$p = $this->getPackage('foo', '2.1'),
|
||||
|
|
|
@ -22,7 +22,7 @@ use Composer\Test\TestCase;
|
|||
|
||||
class RuleTest extends TestCase
|
||||
{
|
||||
public function testGetHash()
|
||||
public function testGetHash(): void
|
||||
{
|
||||
$rule = new GenericRule(array(123), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
|
||||
|
@ -30,7 +30,7 @@ class RuleTest extends TestCase
|
|||
$this->assertEquals($hash['hash'], $rule->getHash());
|
||||
}
|
||||
|
||||
public function testEqualsForRulesWithDifferentHashes()
|
||||
public function testEqualsForRulesWithDifferentHashes(): void
|
||||
{
|
||||
$rule = new GenericRule(array(1, 2), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
$rule2 = new GenericRule(array(1, 3), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
|
@ -38,7 +38,7 @@ class RuleTest extends TestCase
|
|||
$this->assertFalse($rule->equals($rule2));
|
||||
}
|
||||
|
||||
public function testEqualsForRulesWithDifferLiteralsQuantity()
|
||||
public function testEqualsForRulesWithDifferLiteralsQuantity(): void
|
||||
{
|
||||
$rule = new GenericRule(array(1, 12), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
$rule2 = new GenericRule(array(1), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
|
@ -46,7 +46,7 @@ class RuleTest extends TestCase
|
|||
$this->assertFalse($rule->equals($rule2));
|
||||
}
|
||||
|
||||
public function testEqualsForRulesWithSameLiterals()
|
||||
public function testEqualsForRulesWithSameLiterals(): void
|
||||
{
|
||||
$rule = new GenericRule(array(1, 12), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
$rule2 = new GenericRule(array(1, 12), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
|
@ -54,7 +54,7 @@ class RuleTest extends TestCase
|
|||
$this->assertTrue($rule->equals($rule2));
|
||||
}
|
||||
|
||||
public function testSetAndGetType()
|
||||
public function testSetAndGetType(): void
|
||||
{
|
||||
$rule = new GenericRule(array(), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
$rule->setType(RuleSet::TYPE_REQUEST);
|
||||
|
@ -62,7 +62,7 @@ class RuleTest extends TestCase
|
|||
$this->assertEquals(RuleSet::TYPE_REQUEST, $rule->getType());
|
||||
}
|
||||
|
||||
public function testEnable()
|
||||
public function testEnable(): void
|
||||
{
|
||||
$rule = new GenericRule(array(), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
$rule->disable();
|
||||
|
@ -72,7 +72,7 @@ class RuleTest extends TestCase
|
|||
$this->assertFalse($rule->isDisabled());
|
||||
}
|
||||
|
||||
public function testDisable()
|
||||
public function testDisable(): void
|
||||
{
|
||||
$rule = new GenericRule(array(), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
$rule->enable();
|
||||
|
@ -82,7 +82,7 @@ class RuleTest extends TestCase
|
|||
$this->assertFalse($rule->isEnabled());
|
||||
}
|
||||
|
||||
public function testIsAssertions()
|
||||
public function testIsAssertions(): void
|
||||
{
|
||||
$rule = new GenericRule(array(1, 12), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
$rule2 = new GenericRule(array(1), Rule::RULE_ROOT_REQUIRE, array('packageName' => '', 'constraint' => new MatchAllConstraint));
|
||||
|
@ -91,7 +91,7 @@ class RuleTest extends TestCase
|
|||
$this->assertTrue($rule2->isAssertion());
|
||||
}
|
||||
|
||||
public function testPrettyString()
|
||||
public function testPrettyString(): void
|
||||
{
|
||||
$pool = new Pool(array(
|
||||
$p1 = $this->getPackage('foo', '2.1'),
|
||||
|
|
|
@ -58,7 +58,7 @@ class SolverTest extends TestCase
|
|||
$this->policy = new DefaultPolicy;
|
||||
}
|
||||
|
||||
public function testSolverInstallSingle()
|
||||
public function testSolverInstallSingle(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->reposComplete();
|
||||
|
@ -70,7 +70,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverRemoveIfNotRequested()
|
||||
public function testSolverRemoveIfNotRequested(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->reposComplete();
|
||||
|
@ -80,7 +80,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testInstallNonExistingPackageFails()
|
||||
public function testInstallNonExistingPackageFails(): void
|
||||
{
|
||||
$this->repo->addPackage($this->getPackage('A', '1.0'));
|
||||
$this->reposComplete();
|
||||
|
@ -99,7 +99,7 @@ class SolverTest extends TestCase
|
|||
}
|
||||
}
|
||||
|
||||
public function testSolverInstallSamePackageFromDifferentRepositories()
|
||||
public function testSolverInstallSamePackageFromDifferentRepositories(): void
|
||||
{
|
||||
$repo1 = new ArrayRepository;
|
||||
$repo2 = new ArrayRepository;
|
||||
|
@ -117,7 +117,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverInstallWithDeps()
|
||||
public function testSolverInstallWithDeps(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -135,7 +135,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverInstallHonoursNotEqualOperator()
|
||||
public function testSolverInstallHonoursNotEqualOperator(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -161,7 +161,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverInstallWithDepsInOrder()
|
||||
public function testSolverInstallWithDepsInOrder(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -207,7 +207,7 @@ class SolverTest extends TestCase
|
|||
*
|
||||
* CAUTION: IF THIS TEST EVER FAILS, SOLVER BEHAVIOR HAS CHANGED AND MAY BREAK DOWNSTREAM USERS
|
||||
*/
|
||||
public function testSolverMultiPackageNameVersionResolutionDependsOnRequireOrder()
|
||||
public function testSolverMultiPackageNameVersionResolutionDependsOnRequireOrder(): void
|
||||
{
|
||||
$this->repo->addPackage($php74 = $this->getPackage('ourcustom/PHP', '7.4.23'));
|
||||
$this->repo->addPackage($php80 = $this->getPackage('ourcustom/PHP', '8.0.10'));
|
||||
|
@ -256,7 +256,7 @@ class SolverTest extends TestCase
|
|||
*
|
||||
* CAUTION: IF THIS TEST EVER FAILS, SOLVER BEHAVIOR HAS CHANGED AND MAY BREAK DOWNSTREAM USERS
|
||||
*/
|
||||
public function testSolverMultiPackageNameVersionResolutionIsIndependentOfRequireOrderIfOrderedDescendingByRequirement()
|
||||
public function testSolverMultiPackageNameVersionResolutionIsIndependentOfRequireOrderIfOrderedDescendingByRequirement(): void
|
||||
{
|
||||
$this->repo->addPackage($php74 = $this->getPackage('ourcustom/PHP', '7.4'));
|
||||
$this->repo->addPackage($php80 = $this->getPackage('ourcustom/PHP', '8.0'));
|
||||
|
@ -297,7 +297,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverFixLocked()
|
||||
public function testSolverFixLocked(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->reposComplete();
|
||||
|
@ -307,7 +307,7 @@ class SolverTest extends TestCase
|
|||
$this->checkSolverResult(array());
|
||||
}
|
||||
|
||||
public function testSolverFixLockedWithAlternative()
|
||||
public function testSolverFixLockedWithAlternative(): void
|
||||
{
|
||||
$this->repo->addPackage($this->getPackage('A', '1.0'));
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
|
@ -318,7 +318,7 @@ class SolverTest extends TestCase
|
|||
$this->checkSolverResult(array());
|
||||
}
|
||||
|
||||
public function testSolverUpdateDoesOnlyUpdate()
|
||||
public function testSolverUpdateDoesOnlyUpdate(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repoLocked->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -335,7 +335,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverUpdateSingle()
|
||||
public function testSolverUpdateSingle(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($newPackageA = $this->getPackage('A', '1.1'));
|
||||
|
@ -348,7 +348,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverUpdateAll()
|
||||
public function testSolverUpdateAll(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repoLocked->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -368,7 +368,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverUpdateCurrent()
|
||||
public function testSolverUpdateCurrent(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($this->getPackage('A', '1.0'));
|
||||
|
@ -379,7 +379,7 @@ class SolverTest extends TestCase
|
|||
$this->checkSolverResult(array());
|
||||
}
|
||||
|
||||
public function testSolverUpdateOnlyUpdatesSelectedPackage()
|
||||
public function testSolverUpdateOnlyUpdatesSelectedPackage(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repoLocked->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -396,7 +396,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverUpdateConstrained()
|
||||
public function testSolverUpdateConstrained(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($newPackageA = $this->getPackage('A', '1.2'));
|
||||
|
@ -412,7 +412,7 @@ class SolverTest extends TestCase
|
|||
)));
|
||||
}
|
||||
|
||||
public function testSolverUpdateFullyConstrained()
|
||||
public function testSolverUpdateFullyConstrained(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($newPackageA = $this->getPackage('A', '1.2'));
|
||||
|
@ -428,7 +428,7 @@ class SolverTest extends TestCase
|
|||
)));
|
||||
}
|
||||
|
||||
public function testSolverUpdateFullyConstrainedPrunesInstalledPackages()
|
||||
public function testSolverUpdateFullyConstrainedPrunesInstalledPackages(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repoLocked->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -451,7 +451,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverAllJobs()
|
||||
public function testSolverAllJobs(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageD = $this->getPackage('D', '1.0'));
|
||||
$this->repoLocked->addPackage($oldPackageC = $this->getPackage('C', '1.0'));
|
||||
|
@ -476,7 +476,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverThreeAlternativeRequireAndConflict()
|
||||
public function testSolverThreeAlternativeRequireAndConflict(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '2.0'));
|
||||
$this->repo->addPackage($middlePackageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -495,7 +495,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverObsolete()
|
||||
public function testSolverObsolete(): void
|
||||
{
|
||||
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -511,7 +511,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testInstallOneOfTwoAlternatives()
|
||||
public function testInstallOneOfTwoAlternatives(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('A', '1.0'));
|
||||
|
@ -525,7 +525,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testInstallProvider()
|
||||
public function testInstallProvider(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageQ = $this->getPackage('Q', '1.0'));
|
||||
|
@ -542,7 +542,7 @@ class SolverTest extends TestCase
|
|||
$this->solver->solve($this->request);
|
||||
}
|
||||
|
||||
public function testSkipReplacerOfExistingPackage()
|
||||
public function testSkipReplacerOfExistingPackage(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageQ = $this->getPackage('Q', '1.0'));
|
||||
|
@ -560,7 +560,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testNoInstallReplacerOfMissingPackage()
|
||||
public function testNoInstallReplacerOfMissingPackage(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageQ = $this->getPackage('Q', '1.0'));
|
||||
|
@ -576,7 +576,7 @@ class SolverTest extends TestCase
|
|||
$this->solver->solve($this->request);
|
||||
}
|
||||
|
||||
public function testSkipReplacedPackageIfReplacerIsSelected()
|
||||
public function testSkipReplacedPackageIfReplacerIsSelected(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageQ = $this->getPackage('Q', '1.0'));
|
||||
|
@ -595,7 +595,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testPickOlderIfNewerConflicts()
|
||||
public function testPickOlderIfNewerConflicts(): void
|
||||
{
|
||||
$this->repo->addPackage($packageX = $this->getPackage('X', '1.0'));
|
||||
$packageX->setRequires(array(
|
||||
|
@ -633,7 +633,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testInstallCircularRequire()
|
||||
public function testInstallCircularRequire(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB1 = $this->getPackage('B', '0.9'));
|
||||
|
@ -651,7 +651,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testInstallAlternativeWithCircularRequire()
|
||||
public function testInstallAlternativeWithCircularRequire(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -681,7 +681,7 @@ class SolverTest extends TestCase
|
|||
* If a replacer D replaces B and C with C not otherwise available,
|
||||
* D must be installed instead of the original B.
|
||||
*/
|
||||
public function testUseReplacerIfNecessary()
|
||||
public function testUseReplacerIfNecessary(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -714,7 +714,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testIssue265()
|
||||
public function testIssue265(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA1 = $this->getPackage('A', '2.0.999999-dev'));
|
||||
$this->repo->addPackage($packageA2 = $this->getPackage('A', '2.1-dev'));
|
||||
|
@ -749,7 +749,7 @@ class SolverTest extends TestCase
|
|||
$this->solver->solve($this->request);
|
||||
}
|
||||
|
||||
public function testConflictResultEmpty()
|
||||
public function testConflictResultEmpty(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -782,7 +782,7 @@ class SolverTest extends TestCase
|
|||
}
|
||||
}
|
||||
|
||||
public function testUnsatisfiableRequires()
|
||||
public function testUnsatisfiableRequires(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -812,7 +812,7 @@ class SolverTest extends TestCase
|
|||
}
|
||||
}
|
||||
|
||||
public function testRequireMismatchException()
|
||||
public function testRequireMismatchException(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -860,7 +860,7 @@ class SolverTest extends TestCase
|
|||
}
|
||||
}
|
||||
|
||||
public function testLearnLiteralsWithSortedRuleLiterals()
|
||||
public function testLearnLiteralsWithSortedRuleLiterals(): void
|
||||
{
|
||||
$this->repo->addPackage($packageTwig2 = $this->getPackage('twig/twig', '2.0'));
|
||||
$this->repo->addPackage($packageTwig16 = $this->getPackage('twig/twig', '1.6'));
|
||||
|
@ -887,7 +887,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testInstallRecursiveAliasDependencies()
|
||||
public function testInstallRecursiveAliasDependencies(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '2.0'));
|
||||
|
@ -913,7 +913,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testInstallDevAlias()
|
||||
public function testInstallDevAlias(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '2.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -936,7 +936,7 @@ class SolverTest extends TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testInstallRootAliasesIfAliasOfIsInstalled()
|
||||
public function testInstallRootAliasesIfAliasOfIsInstalled(): void
|
||||
{
|
||||
// root aliased, required
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
|
@ -975,7 +975,7 @@ class SolverTest extends TestCase
|
|||
* In particular in this case the goal is to first have the solver decide X 2.0 should not be installed to later
|
||||
* decide to learn that X 2.0 must be installed and revert decisions to retry solving with this new assumption.
|
||||
*/
|
||||
public function testLearnPositiveLiteral()
|
||||
public function testLearnPositiveLiteral(): void
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '1.0'));
|
||||
|
@ -1042,7 +1042,7 @@ class SolverTest extends TestCase
|
|||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function reposComplete()
|
||||
protected function reposComplete(): void
|
||||
{
|
||||
$this->repoSet->addRepository($this->repo);
|
||||
$this->repoSet->addRepository($this->repoLocked);
|
||||
|
@ -1051,7 +1051,7 @@ class SolverTest extends TestCase
|
|||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function createSolver()
|
||||
protected function createSolver(): void
|
||||
{
|
||||
$io = new NullIO();
|
||||
$this->pool = $this->repoSet->createPool($this->request, $io);
|
||||
|
@ -1062,7 +1062,7 @@ class SolverTest extends TestCase
|
|||
* @param array<array<string, string>> $expected
|
||||
* @return void
|
||||
*/
|
||||
protected function checkSolverResult(array $expected)
|
||||
protected function checkSolverResult(array $expected): void
|
||||
{
|
||||
$this->createSolver();
|
||||
$transaction = $this->solver->solve($this->request);
|
||||
|
|
|
@ -27,7 +27,7 @@ class TransactionTest extends TestCase
|
|||
{
|
||||
}
|
||||
|
||||
public function testTransactionGenerationAndSorting()
|
||||
public function testTransactionGenerationAndSorting(): void
|
||||
{
|
||||
$presentPackages = array(
|
||||
$packageA = $this->getPackage('a/a', 'dev-master'),
|
||||
|
@ -103,7 +103,7 @@ class TransactionTest extends TestCase
|
|||
* @param array<array<string, string>> $expected
|
||||
* @return void
|
||||
*/
|
||||
protected function checkTransactionOperations(Transaction $transaction, array $expected)
|
||||
protected function checkTransactionOperations(Transaction $transaction, array $expected): void
|
||||
{
|
||||
$result = array();
|
||||
foreach ($transaction->getOperations() as $operation) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue