From 863e7076baff02b9de46718a77fce77364db7f65 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 26 May 2020 18:03:49 +0200 Subject: [PATCH] Bump to use composer/semver 3.x --- composer.json | 2 +- composer.lock | 12 ++++++------ .../Composer/Test/DependencyResolver/SolverTest.php | 4 ++-- .../Test/Repository/FilterRepositoryTest.php | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 5b29439db..6a89758a4 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require": { "php": "^5.3.2 || ^7.0", "composer/ca-bundle": "^1.0", - "composer/semver": "^2.1@dev", + "composer/semver": "^3.0@dev", "composer/spdx-licenses": "^1.2", "composer/xdebug-handler": "^1.1", "justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0", diff --git a/composer.lock b/composer.lock index d7fd5fb0f..e9fa2fea3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aaa28d3c716a6b5d973347f4046f4931", + "content-hash": "b596d49d8047528b59baeab735f1f98f", "packages": [ { "name": "composer/ca-bundle", @@ -83,12 +83,12 @@ "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "7401fc3628694736b1cac8ec8d5c7dfdcfe54ea6" + "reference": "e28fa06aecbe17194fed4c58ee1de18190892677" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/7401fc3628694736b1cac8ec8d5c7dfdcfe54ea6", - "reference": "7401fc3628694736b1cac8ec8d5c7dfdcfe54ea6", + "url": "https://api.github.com/repos/composer/semver/zipball/e28fa06aecbe17194fed4c58ee1de18190892677", + "reference": "e28fa06aecbe17194fed4c58ee1de18190892677", "shasum": "" }, "require": { @@ -101,7 +101,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { @@ -156,7 +156,7 @@ "type": "tidelift" } ], - "time": "2020-05-21T14:08:19+00:00" + "time": "2020-05-26T12:57:06+00:00" }, { "name": "composer/spdx-licenses", diff --git a/tests/Composer/Test/DependencyResolver/SolverTest.php b/tests/Composer/Test/DependencyResolver/SolverTest.php index b7d0e7bc1..5201bf6d5 100644 --- a/tests/Composer/Test/DependencyResolver/SolverTest.php +++ b/tests/Composer/Test/DependencyResolver/SolverTest.php @@ -25,7 +25,7 @@ use Composer\Repository\InstalledArrayRepository; use Composer\Repository\RepositorySet; use Composer\Test\TestCase; use Composer\Semver\Constraint\MultiConstraint; -use Composer\Semver\Constraint\EmptyConstraint; +use Composer\Semver\Constraint\MatchNoneConstraint; class SolverTest extends TestCase { @@ -379,7 +379,7 @@ class SolverTest extends TestCase { $this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0')); $this->repo->addPackage($packageB = $this->getPackage('B', '1.0')); - $packageB->setReplaces(array('a' => new Link('B', 'A', new EmptyConstraint()))); + $packageB->setReplaces(array('a' => new Link('B', 'A', new MatchNoneConstraint()))); $this->reposComplete(); diff --git a/tests/Composer/Test/Repository/FilterRepositoryTest.php b/tests/Composer/Test/Repository/FilterRepositoryTest.php index 2973e445d..b026a2e2b 100644 --- a/tests/Composer/Test/Repository/FilterRepositoryTest.php +++ b/tests/Composer/Test/Repository/FilterRepositoryTest.php @@ -15,7 +15,7 @@ namespace Composer\Test\Repository; use Composer\Test\TestCase; use Composer\Repository\FilterRepository; use Composer\Repository\ArrayRepository; -use Composer\Semver\Constraint\EmptyConstraint; +use Composer\Semver\Constraint\MatchNoneConstraint; use Composer\Package\BasePackage; class FilterRepositoryTest extends TestCase @@ -54,7 +54,7 @@ class FilterRepositoryTest extends TestCase public function testCanonicalDefaultTrue() { $repo = new FilterRepository($this->arrayRepo, array()); - $result = $repo->loadPackages(array('foo/aaa' => new EmptyConstraint), BasePackage::$stabilities, array()); + $result = $repo->loadPackages(array('foo/aaa' => new MatchNoneConstraint), BasePackage::$stabilities, array()); $this->assertCount(1, $result['packages']); $this->assertCount(1, $result['namesFound']); } @@ -62,7 +62,7 @@ class FilterRepositoryTest extends TestCase public function testNonCanonical() { $repo = new FilterRepository($this->arrayRepo, array('canonical' => false)); - $result = $repo->loadPackages(array('foo/aaa' => new EmptyConstraint), BasePackage::$stabilities, array()); + $result = $repo->loadPackages(array('foo/aaa' => new MatchNoneConstraint), BasePackage::$stabilities, array()); $this->assertCount(1, $result['packages']); $this->assertCount(0, $result['namesFound']); }