1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Explicitly deprecate misuse of the link setters to enforce the fact they expect maps (#10281)

This commit is contained in:
Jordi Boggiano 2021-11-12 21:38:08 +01:00 committed by GitHub
parent 903173ead5
commit 65765a148a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 84 additions and 40 deletions

View file

@ -215,13 +215,13 @@ class SolverTest extends TestCase
$this->repo->addPackage($extForPhp80 = $this->getPackage('ourcustom/ext-foobar', '1.0'));
$extForPhp74->setRequires(array(
'php' => new Link('ourcustom/ext-foobar', 'ourcustom/PHP', new MultiConstraint(array(
'ourcustom/php' => new Link('ourcustom/ext-foobar', 'ourcustom/PHP', new MultiConstraint(array(
$this->getVersionConstraint('>=', '7.4.0'),
$this->getVersionConstraint('<', '7.5.0'),
)), Link::TYPE_REQUIRE),
));
$extForPhp80->setRequires(array(
'php' => new Link('ourcustom/ext-foobar', 'ourcustom/PHP', new MultiConstraint(array(
'ourcustom/php' => new Link('ourcustom/ext-foobar', 'ourcustom/PHP', new MultiConstraint(array(
$this->getVersionConstraint('>=', '8.0.0'),
$this->getVersionConstraint('<', '8.1.0'),
)), Link::TYPE_REQUIRE),
@ -264,13 +264,13 @@ class SolverTest extends TestCase
$this->repo->addPackage($extForPhp74 = $this->getPackage('ourcustom/ext-foobar', '1.0'));
$extForPhp80->setRequires(array(
'php' => new Link('ourcustom/ext-foobar', 'ourcustom/PHP', new MultiConstraint(array(
'ourcustom/php' => new Link('ourcustom/ext-foobar', 'ourcustom/PHP', new MultiConstraint(array(
$this->getVersionConstraint('>=', '8.0.0'),
$this->getVersionConstraint('<', '8.1.0'),
)), Link::TYPE_REQUIRE),
));
$extForPhp74->setRequires(array(
'php' => new Link('ourcustom/ext-foobar', 'ourcustom/PHP', new MultiConstraint(array(
'ourcustom/php' => new Link('ourcustom/ext-foobar', 'ourcustom/PHP', new MultiConstraint(array(
$this->getVersionConstraint('>=', '7.4.0'),
$this->getVersionConstraint('<', '7.5.0'),
)), Link::TYPE_REQUIRE),