Article View: linux.debian.devel.release
Article #993Bug#1146066: marked as done (trixie-pu: package composer/2.8.8-1+deb13u4)
From: Debian Bug Tracking System
Date: Sat, 21 Nov 2026 09:40
Date: Sat, 21 Nov 2026 09:40
3460 lines
148510 bytes
148510 bytes
This is a multi-part message in MIME format...
------------=_1795253352-3308459-0
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"
Your message dated Sat, 21 Nov 2026 09:28:02 +0000
with message-id <E1xUhO6-00000008svH-04yQ@coccia.debian.org>
and subject line Released in 13.8
has caused the Debian Bug report #1146066,
regarding trixie-pu: package composer/2.8.8-1+deb13u4
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)
--=20
1146066: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D1146066
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
------------=_1795253352-3308459-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Received: (at submit) by bugs.debian.org; 29 Aug 2026 14:19:30 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
(2024-03-25) on buxtehude.debian.org
X-Spam-Level:
X-Spam-Status: No, score=-30.0 required=4.0 tests=BAYES_00,
BODY_INCLUDES_CONTROL_AFFECTS,BODY_INCLUDES_PACKAGE,DKIM_INVALID,
DKIM_SIGNED,FOURLA,FROMDEVELOPER,FVGT_m_MULTI_ODD,HAS_PACKAGE,
HEADER_FROM_DIFFERENT_DOMAINS,MD5_SHA1_SUM,MONEY,PGPSIGNATURE,
RDNS_NONE,SPF_HELO_NONE,SPF_PASS,STOCKLIKE,URIBL_CSS_A autolearn=ham
autolearn_force=no version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 365; hammy, 150; neutral, 561; spammy,
0. spammytokens: hammytokens:0.000-+--H*ct:pgp-sha256,
0.000-+--XDebbugsCc, 0.000-+--X-Debbugs-Cc, 0.000-+--trixie,
0.000-+--H*Ad:N*Bug
Return-path: <taffit@tilapin.org>
Received: from [2a0c:e303:0:ae01:7285:c2ff:fe7d:4dce] (port=41932 helo=carotte.tilapin.org)
by buxtehude.debian.org with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
(Exim 4.96)
(envelope-from <taffit@tilapin.org>)
id 1x0Ju5-000pKQ-0t
for submit@bugs.debian.org;
Sat, 29 Aug 2026 14:19:30 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org;
s=20181003; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date:
Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
List-Post:List-Owner:List-Archive;
bh=ixINiZ4paEuni05xSGyysJt6vNOzh9ipiANLYvRiQtU=; b=M/KQsM+SubWAMTyl+oKAWiynGY
YebK38Ig/GxuSbTPiLPW3ran6Ycg+gedtieJBIZ6pvrBVL8m7hnAirN0RPClE2HutmfeGinnC4Cqq
5U96IdSE1MpGPzEnkgPv1Ff+jzaMy6e2t97UjOnbjC7KKGMMy/7jrRzUrkwVwUBg+ld05dgGbrHlz
Jbzk1FApxKskfdJSR44aqXBSCU8zC3YKyf1cEullfp4qIlcEIlJho0t3NGYrfxPHejLiHpMPCR5WF
hw158WkgnsvGaxluCJ5uGy1O2pFFBnMFC4voTYrDhDO6PF74h8w67VGjPVNOWhH+8AH+otN9IdWRj
CTOJQtvg==;
Received: from [185.110.89.192] (helo=brocoli)
by carotte.tilapin.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
(Exim 4.96)
(envelope-from <taffit@tilapin.org>)
id 1x0Jtv-0074iQ-20;
Sat, 29 Aug 2026 16:19:20 +0200
Received: from taffit by brocoli with local (Exim 4.100)
(envelope-from <taffit@brocoli.tilapin.org>)
id 1x0Jts-000000067Gz-3N47;
Sat, 29 Aug 2026 16:19:16 +0200
Date: Sat, 29 Aug 2026 16:19:16 +0200
From: David =?iso-8859-1?Q?Pr=E9vot?= <taffit@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: trixie-pu: package composer/2.8.8-1+deb13u4
Message-ID: <apLqYZjnNyX9tXr4@brocoli.tilapin.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature"; boundary="M7TrM3ytDGlN7ICn"
Content-Disposition: inline
X-Reportbug-Version: 13.2.0+nmu1
Delivered-To: submit@bugs.debian.org
--M7TrM3ytDGlN7ICn
Content-Type: multipart/mixed; boundary="ZDpaeHI7ehnNuX3V"
Content-Disposition: inline
--ZDpaeHI7ehnNuX3V
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: composer@packages.debian.org, Debian Security Team <team@secu=
rity.debian.org>
Control: affects -1 + src:composer
User: release.debian.org@packages.debian.org
Usertags: pu
Hi,
I=E2=80=99d like to fix five security issues that are not worth a DSA in the
next point release (four are marked as no-dsa, the fifth one has no CVE
assigned).
[ Tests ]
The test suite has been updated with the code change.
[ Checklist ]
[x] *all* changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in (old)stable
[x] the issue is verified as fixed in unstable
Thanks in advance for considering.
Regards,
taffit
--ZDpaeHI7ehnNuX3V
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment; filename=composer.patch
Content-Transfer-Encoding: quoted-printable
diff -Nru composer-2.8.8/debian/changelog composer-2.8.8/debian/changelog
--- composer-2.8.8/debian/changelog 2026-05-14 10:37:40.000000000 +0200
+++ composer-2.8.8/debian/changelog 2026-08-29 13:39:42.000000000 +0200
@@ -1,3 +1,20 @@
+composer (2.8.8-1+deb13u4) trixie; urgency=3Dmedium
+
+ * Backport fixes from 2.10.2 and 2.10.3 releases:
+ + Validate resolved packages before locking (GHSA-499r-g7pc-vmp9)
+ [CVE-2026-59948]
+ + Validate package bin paths against path traversal (GHSA-gjfg-22fp-rr=
xx)
+ [CVE-2026-59946]
+ + Relax token validation on input, and hide more things on output (#12=
886)
+ + Sanitize URL-embedded usernames/tokens in verbose output
+ (GHSA-g6xq-892h-64w3) [CVE-2026-59947]
+ + Security: Validate package bin paths against path traversal
+ using symlinks (GHSA-96h3-5x6v-m776) [CVE-2026-59944]
+ + Security: Fixed command injection via malicious Perforce url
+ (GHSA-rvx4-ffvw-m9q3)
+
+ -- David Pr=C3=A9vot <taffit@debian.org> Sat, 29 Aug 2026 13:39:42 +0200
+
composer (2.8.8-1+deb13u3) trixie; urgency=3Dmedium
=20
* Fix regexp to support new GitHub installation tokens format
diff -Nru composer-2.8.8/debian/patches/0022-Merge-commit-from-fork.patch c=
omposer-2.8.8/debian/patches/0022-Merge-commit-from-fork.patch
--- composer-2.8.8/debian/patches/0022-Merge-commit-from-fork.patch 1970-01=
-01 01:00:00.000000000 +0100
+++ composer-2.8.8/debian/patches/0022-Merge-commit-from-fork.patch 2026-08=
-29 13:39:42.000000000 +0200
@@ -0,0 +1,1298 @@
+From: Jordi Boggiano <j.boggiano@seld.be>
+Date: Wed, 1 Jul 2026 10:52:49 +0200
+Subject: Merge commit from fork
+
+* Validate resolved packages before locking (GHSA-499r-g7pc-vmp9)
+
+Add ValidatingArrayLoader::validatePackage() and call it from
+LockTransaction::setResultPackages() so every package coming out of the
+solver is re-checked before it is written to / installed from composer.loc=
k.
+
+Packages served by a repository are loaded via the non-validating
+ArrayLoader, so the name and source/dist url+reference checks done in
+load() never run on them. This re-applies the security-sensitive subset of
+those checks at the lock transaction (hit by both update and install),
+guarding against malicious package names and "-"-prefixed urls/references
+that could be interpreted as command-line options (argument injection).
+
+Test fixtures in SolverTest/InstallerTest that used shorthand package names
+(A, B, ...) are renamed to valid vendor/name form so they pass validation.
+
+* Validate package bin paths against path traversal (GHSA-gjfg-22fp-rrxx)
+
+Reject bin entries containing ".." path segments in both
+ValidatingArrayLoader::load() (so packagist.org and `composer validate`
+flag them at publish time) and ValidatingArrayLoader::validatePackage()
+(so every resolved package is re-checked before it is written to or
+installed from the lock file, on both update and install).
+
+Without this a dependency's bin entry such as "../../../../etc/shadow"
+makes BinaryInstaller resolve a path outside the package directory and
+chmod(0777 & ~umask()) an arbitrary host file during composer install.
+
+Origin: upstream, https://github.com/composer/composer/commit/502c6c4f6998=
02d9cf464728b3e8a95674f919a0
+Bug: https://github.com/composer/composer/security/advisories/GHSA-gjfg-22=
fp-rrxx
+ https://github.com/composer/composer/security/advisories/GHSA-499r-g7=
pc-vmp9
+Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-59946
+ https://security-tracker.debian.org/tracker/CVE-2026-59948
+---
+ .../DependencyResolver/LockTransaction.php | 3 +
+ ...DownloadException.php =3D> SecurityException.php} | 2 +-
+ .../Package/Loader/ValidatingArrayLoader.php | 66 +++
+ .../Test/DependencyResolver/SolverTest.php | 484 ++++++++++------=
-----
+ tests/Composer/Test/InstallerTest.php | 16 +-
+ .../Package/Loader/ValidatingArrayLoaderTest.php | 89 ++++
+ 6 files changed, 409 insertions(+), 251 deletions(-)
+ copy src/Composer/Exception/{IrrecoverableDownloadException.php =3D> Secu=
rityException.php} (85%)
+
+diff --git a/src/Composer/DependencyResolver/LockTransaction.php b/src/Com=
poser/DependencyResolver/LockTransaction.php
+index d77a211..8c94b3a 100644
+--- a/src/Composer/DependencyResolver/LockTransaction.php
++++ b/src/Composer/DependencyResolver/LockTransaction.php
+@@ -14,6 +14,7 @@ namespace Composer\DependencyResolver;
+=20
+ use Composer\Package\AliasPackage;
+ use Composer\Package\BasePackage;
++use Composer\Package\Loader\ValidatingArrayLoader;
+ use Composer\Package\Package;
+ use Composer\Pcre\Preg;
+=20
+@@ -70,6 +71,8 @@ class LockTransaction extends Transaction
+ if ($literal > 0) {
+ $package =3D $pool->literalToPackage($literal);
+=20
++ ValidatingArrayLoader::validatePackage($package);
++
+ $this->resultPackages['all'][] =3D $package;
+ if (!isset($this->unlockableMap[$package->id])) {
+ $this->resultPackages['non-dev'][] =3D $package;
+diff --git a/src/Composer/Exception/IrrecoverableDownloadException.php b/s=
rc/Composer/Exception/SecurityException.php
+similarity index 85%
+copy from src/Composer/Exception/IrrecoverableDownloadException.php
+copy to src/Composer/Exception/SecurityException.php
+index a442786..29036a8 100644
+--- a/src/Composer/Exception/IrrecoverableDownloadException.php
++++ b/src/Composer/Exception/SecurityException.php
+@@ -15,6 +15,6 @@ namespace Composer\Exception;
+ /**
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ */
+-class IrrecoverableDownloadException extends \RuntimeException
++class SecurityException extends \UnexpectedValueException
+ {
+ }
+diff --git a/src/Composer/Package/Loader/ValidatingArrayLoader.php b/src/C=
omposer/Package/Loader/ValidatingArrayLoader.php
+index e3600d6..7830fd6 100644
+--- a/src/Composer/Package/Loader/ValidatingArrayLoader.php
++++ b/src/Composer/Package/Loader/ValidatingArrayLoader.php
+@@ -12,7 +12,10 @@
+=20
+ namespace Composer\Package\Loader;
+=20
++use Composer\Exception\SecurityException;
+ use Composer\Package\BasePackage;
++use Composer\Package\PackageInterface;
++use Composer\Package\RootPackageInterface;
+ use Composer\Pcre\Preg;
+ use Composer\Semver\Constraint\Constraint;
+ use Composer\Package\Version\VersionParser;
+@@ -114,6 +117,21 @@ class ValidatingArrayLoader implements LoaderInterface
+ } else {
+ $this->validateFlatArray('bin');
+ }
++ // A ".." path segment in a bin escapes the package install d=
irectory and lets the
++ // package chmod/point at an arbitrary host file during insta=
ll (GHSA-gjfg-22fp-rrxx).
++ if (isset($this->config['bin']) && is_string($this->config['b=
in'])) {
++ if (Preg::isMatch('{(?:^|[\\\\/])\.\.(?:[\\\\/]|$)}', $th=
is->config['bin'])) {
++ $this->errors[] =3D 'bin : invalid value ('.$this->co=
nfig['bin'].'), must not contain a ".." path component';
++ unset($this->config['bin']);
++ }
++ } elseif (isset($this->config['bin']) && is_array($this->conf=
ig['bin'])) {
++ foreach ($this->config['bin'] as $key =3D> $bin) {
++ if (is_string($bin) && Preg::isMatch('{(?:^|[\\\\/])\=
=2E\.(?:[\\\\/]|$)}', $bin)) {
++ $this->errors[] =3D 'bin.'.$key.' : invalid value=
('.$bin.'), must not contain a ".." path component';
++ unset($this->config['bin'][$key]);
++ }
++ }
++ }
+ }
+=20
+ $this->validateArray('scripts'); // TODO validate event names & l=
istener syntax
+@@ -511,6 +529,54 @@ class ValidatingArrayLoader implements LoaderInterface
+ return null;
+ }
+=20
++ /**
++ * Re-applies the security-sensitive subset of the load() validation =
to a resolved package
++ * which may have been loaded via the non-validating ArrayLoader, bef=
ore it is written to or
++ * installed from the lock file. This guards against malicious packag=
e names and source/dist
++ * URLs or references that could be interpreted as command-line optio=
ns (argument injection)
++ * by the VCS/download tooling.
++ *
++ * @throws SecurityException
++ */
++ public static function validatePackage(PackageInterface $package): vo=
id
++ {
++ // The root package's name/metadata is locally controlled and alr=
eady validated by
++ // RootPackageLoader (and its "__root__" placeholder name would b=
e a false positive here).
++ // RootPackageInterface covers both RootPackage and RootAliasPack=
age.
++ if ($package instanceof RootPackageInterface) {
++ return;
++ }
++
++ // getName() is already lowercased, so the uppercase style branch=
never fires and only
++ // structural/security failures throw. Platform packages return n=
ull here.
++ if (null !=3D=3D ($err =3D self::hasPackageNamingError($package->=
getName()))) {
++ throw new SecurityException('Invalid package found during dep=
endency resolution, aborting: '.$err);
++ }
++
++ // A url or reference starting with a "-" may be misinterpreted a=
s a command-line option
++ // by the VCS/download tooling, same protection as the source/dis=
t checks done in load().
++ $sourceDist =3D [
++ 'source.url' =3D> $package->getSourceUrl(),
++ 'source.reference' =3D> $package->getSourceReference(),
++ 'dist.url' =3D> $package->getDistUrl(),
++ 'dist.reference' =3D> $package->getDistReference(),
++ ];
++ foreach ($sourceDist as $field =3D> $value) {
++ if ($value !=3D=3D null && Preg::isMatch('{^\s*-}', $value)) {
++ throw new SecurityException($package->getName().' has an =
invalid '.$field.', it must not start with a "-": '.$value);
++ }
++ }
++
++ // Bin paths are resolved relative to the package install dir and=
then chmod'd (and
++ // proxied) by BinaryInstaller. A ".." segment escapes that direc=
tory and lets a
++ // dependency chmod/point at an arbitrary host file (GHSA-gjfg-22=
fp-rrxx), so reject it.
++ foreach ($package->getBinaries() as $bin) {
++ if (Preg::isMatch('{(?:^|[\\\\/])\.\.(?:[\\\\/]|$)}', $bin)) {
++ throw new SecurityException($package->getName().' has an =
invalid bin '.$bin.', it must not contain ".." path segments');
++ }
++ }
++ }
++
+ /**
+ * @phpstan-param non-empty-string $property
+ * @phpstan-param non-empty-string $regex
+diff --git a/tests/Composer/Test/DependencyResolver/SolverTest.php b/tests=
/Composer/Test/DependencyResolver/SolverTest.php
+index 2e7d3eb..e75d30c 100644
+--- a/tests/Composer/Test/DependencyResolver/SolverTest.php
++++ b/tests/Composer/Test/DependencyResolver/SolverTest.php
+@@ -61,10 +61,10 @@ class SolverTest extends TestCase
+=20
+ public function testSolverInstallSingle(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageA],
+@@ -73,7 +73,7 @@ class SolverTest extends TestCase
+=20
+ public function testSolverRemoveIfNotRequested(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
+ $this->reposComplete();
+=20
+ $this->checkSolverResult([
+@@ -83,10 +83,10 @@ class SolverTest extends TestCase
+=20
+ public function testInstallNonExistingPackageFails(): void
+ {
+- $this->repo->addPackage(self::getPackage('A', '1.0'));
++ $this->repo->addPackage(self::getPackage('a/a', '1.0'));
+ $this->reposComplete();
+=20
+- $this->request->requireName('B', self::getVersionConstraint('=3D=
=3D', '1'));
++ $this->request->requireName('b/b', self::getVersionConstraint('=
=3D=3D', '1'));
+=20
+ $this->createSolver();
+ try {
+@@ -96,7 +96,7 @@ class SolverTest extends TestCase
+ $problems =3D $e->getProblems();
+ self::assertCount(1, $problems);
+ self::assertEquals(2, $e->getCode());
+- self::assertEquals("\n - Root composer.json requires b, it=
could not be found in any version, there may be a typo in the package name=
=2E", $problems[0]->getPrettyString($this->repoSet, $this->request, $this->=
pool, false));
++ self::assertEquals("\n - Root composer.json requires b/b, =
it could not be found in any version, there may be a typo in the package na=
me.", $problems[0]->getPrettyString($this->repoSet, $this->request, $this->=
pool, false));
+ }
+ }
+=20
+@@ -105,13 +105,13 @@ class SolverTest extends TestCase
+ $repo1 =3D new ArrayRepository;
+ $repo2 =3D new ArrayRepository;
+=20
+- $repo1->addPackage($foo1 =3D self::getPackage('foo', '1'));
+- $repo2->addPackage($foo2 =3D self::getPackage('foo', '1'));
++ $repo1->addPackage($foo1 =3D self::getPackage('foo/foo', '1'));
++ $repo2->addPackage($foo2 =3D self::getPackage('foo/foo', '1'));
+=20
+ $this->repoSet->addRepository($repo1);
+ $this->repoSet->addRepository($repo2);
+=20
+- $this->request->requireName('foo');
++ $this->request->requireName('foo/foo');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $foo1],
+@@ -120,15 +120,15 @@ class SolverTest extends TestCase
+=20
+ public function testSolverInstallWithDeps(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $this->repo->addPackage($newPackageB =3D self::getPackage('B', '1=
=2E1'));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $this->repo->addPackage($newPackageB =3D self::getPackage('b/b', =
'1.1'));
+=20
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('<', '1.1'), Link::TYPE_REQUIRE)]);
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('<', '1.1'), Link::TYPE_REQUIRE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageB],
+@@ -138,14 +138,14 @@ class SolverTest extends TestCase
+=20
+ public function testSolverInstallHonoursNotEqualOperator(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $this->repo->addPackage($newPackageB11 =3D self::getPackage('B', =
'1.1'));
+- $this->repo->addPackage($newPackageB12 =3D self::getPackage('B', =
'1.2'));
+- $this->repo->addPackage($newPackageB13 =3D self::getPackage('B', =
'1.3'));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $this->repo->addPackage($newPackageB11 =3D self::getPackage('b/b'=
, '1.1'));
++ $this->repo->addPackage($newPackageB12 =3D self::getPackage('b/b'=
, '1.2'));
++ $this->repo->addPackage($newPackageB13 =3D self::getPackage('b/b'=
, '1.3'));
+=20
+ $packageA->setRequires([
+- 'b' =3D> new Link('A', 'B', new MultiConstraint([
++ 'b/b' =3D> new Link('a/a', 'b/b', new MultiConstraint([
+ self::getVersionConstraint('<=3D', '1.3'),
+ self::getVersionConstraint('<>', '1.3'),
+ self::getVersionConstraint('!=3D', '1.2'),
+@@ -154,7 +154,7 @@ class SolverTest extends TestCase
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $newPackageB11],
+@@ -164,23 +164,23 @@ class SolverTest extends TestCase
+=20
+ public function testSolverInstallWithDepsInOrder(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $this->repo->addPackage($packageC =3D self::getPackage('C', '1.0'=
));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $this->repo->addPackage($packageC =3D self::getPackage('c/c', '1.=
0'));
+=20
+ $packageB->setRequires([
+- 'a' =3D> new Link('B', 'A', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
+- 'c' =3D> new Link('B', 'C', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
++ 'a/a' =3D> new Link('b/b', 'a/a', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
++ 'c/c' =3D> new Link('b/b', 'c/c', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+ $packageC->setRequires([
+- 'a' =3D> new Link('C', 'A', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
++ 'a/a' =3D> new Link('c/c', 'a/a', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
+- $this->request->requireName('B');
+- $this->request->requireName('C');
++ $this->request->requireName('a/a');
++ $this->request->requireName('b/b');
++ $this->request->requireName('c/c');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageA],
+@@ -300,7 +300,7 @@ class SolverTest extends TestCase
+=20
+ public function testSolverFixLocked(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
+ $this->reposComplete();
+=20
+ $this->request->fixPackage($packageA);
+@@ -310,8 +310,8 @@ class SolverTest extends TestCase
+=20
+ public function testSolverFixLockedWithAlternative(): void
+ {
+- $this->repo->addPackage(self::getPackage('A', '1.0'));
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
++ $this->repo->addPackage(self::getPackage('a/a', '1.0'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
+ $this->reposComplete();
+=20
+ $this->request->fixPackage($packageA);
+@@ -321,15 +321,15 @@ class SolverTest extends TestCase
+=20
+ public function testSolverUpdateDoesOnlyUpdate(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
+- $this->repoLocked->addPackage($packageB =3D self::getPackage('B',=
'1.0'));
+- $this->repo->addPackage($newPackageB =3D self::getPackage('B', '1=
=2E1'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
++ $this->repoLocked->addPackage($packageB =3D self::getPackage('b/b=
', '1.0'));
++ $this->repo->addPackage($newPackageB =3D self::getPackage('b/b', =
'1.1'));
+ $this->reposComplete();
+=20
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('>=3D', '1.0.0.0'), Link::TYPE_REQUIRE)]);
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0.0.0'), Link::TYPE_REQUIRE)]);
+=20
+ $this->request->fixPackage($packageA);
+- $this->request->requireName('B', self::getVersionConstraint('=3D'=
, '1.1.0.0'));
++ $this->request->requireName('b/b', self::getVersionConstraint('=
=3D', '1.1.0.0'));
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'update', 'from' =3D> $packageB, 'to' =3D> $newPa=
ckageB],
+@@ -338,11 +338,11 @@ class SolverTest extends TestCase
+=20
+ public function testSolverUpdateSingle(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
+- $this->repo->addPackage($newPackageA =3D self::getPackage('A', '1=
=2E1'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
++ $this->repo->addPackage($newPackageA =3D self::getPackage('a/a', =
'1.1'));
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'update', 'from' =3D> $packageA, 'to' =3D> $newPa=
ckageA],
+@@ -351,17 +351,17 @@ class SolverTest extends TestCase
+=20
+ public function testSolverUpdateAll(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
+- $this->repoLocked->addPackage($packageB =3D self::getPackage('B',=
'1.0'));
+- $this->repo->addPackage($newPackageA =3D self::getPackage('A', '1=
=2E1'));
+- $this->repo->addPackage($newPackageB =3D self::getPackage('B', '1=
=2E1'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
++ $this->repoLocked->addPackage($packageB =3D self::getPackage('b/b=
', '1.0'));
++ $this->repo->addPackage($newPackageA =3D self::getPackage('a/a', =
'1.1'));
++ $this->repo->addPackage($newPackageB =3D self::getPackage('b/b', =
'1.1'));
+=20
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', new MatchAllC=
onstraint(), Link::TYPE_REQUIRE)]);
+- $newPackageA->setRequires(['b' =3D> new Link('A', 'B', new MatchA=
llConstraint(), Link::TYPE_REQUIRE)]);
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', new Mat=
chAllConstraint(), Link::TYPE_REQUIRE)]);
++ $newPackageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', new =
MatchAllConstraint(), Link::TYPE_REQUIRE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'update', 'from' =3D> $packageB, 'to' =3D> $newPa=
ckageB],
+@@ -371,25 +371,25 @@ class SolverTest extends TestCase
+=20
+ public function testSolverUpdateCurrent(): void
+ {
+- $this->repoLocked->addPackage(self::getPackage('A', '1.0'));
+- $this->repo->addPackage(self::getPackage('A', '1.0'));
++ $this->repoLocked->addPackage(self::getPackage('a/a', '1.0'));
++ $this->repo->addPackage(self::getPackage('a/a', '1.0'));
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([]);
+ }
+=20
+ public function testSolverUpdateOnlyUpdatesSelectedPackage(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
+- $this->repoLocked->addPackage($packageB =3D self::getPackage('B',=
'1.0'));
+- $this->repo->addPackage($packageAnewer =3D self::getPackage('A', =
'1.1'));
+- $this->repo->addPackage($packageBnewer =3D self::getPackage('B', =
'1.1'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
++ $this->repoLocked->addPackage($packageB =3D self::getPackage('b/b=
', '1.0'));
++ $this->repo->addPackage($packageAnewer =3D self::getPackage('a/a'=
, '1.1'));
++ $this->repo->addPackage($packageBnewer =3D self::getPackage('b/b'=
, '1.1'));
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+ $this->request->fixPackage($packageB);
+=20
+ $this->checkSolverResult([
+@@ -399,12 +399,12 @@ class SolverTest extends TestCase
+=20
+ public function testSolverUpdateConstrained(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
+- $this->repo->addPackage($newPackageA =3D self::getPackage('A', '1=
=2E2'));
+- $this->repo->addPackage(self::getPackage('A', '2.0'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
++ $this->repo->addPackage($newPackageA =3D self::getPackage('a/a', =
'1.2'));
++ $this->repo->addPackage(self::getPackage('a/a', '2.0'));
+ $this->reposComplete();
+=20
+- $this->request->requireName('A', self::getVersionConstraint('<', =
'2.0.0.0'));
++ $this->request->requireName('a/a', self::getVersionConstraint('<'=
, '2.0.0.0'));
+=20
+ $this->checkSolverResult([[
+ 'job' =3D> 'update',
+@@ -415,12 +415,12 @@ class SolverTest extends TestCase
+=20
+ public function testSolverUpdateFullyConstrained(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
+- $this->repo->addPackage($newPackageA =3D self::getPackage('A', '1=
=2E2'));
+- $this->repo->addPackage(self::getPackage('A', '2.0'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
++ $this->repo->addPackage($newPackageA =3D self::getPackage('a/a', =
'1.2'));
++ $this->repo->addPackage(self::getPackage('a/a', '2.0'));
+ $this->reposComplete();
+=20
+- $this->request->requireName('A', self::getVersionConstraint('<', =
'2.0.0.0'));
++ $this->request->requireName('a/a', self::getVersionConstraint('<'=
, '2.0.0.0'));
+=20
+ $this->checkSolverResult([[
+ 'job' =3D> 'update',
+@@ -431,13 +431,13 @@ class SolverTest extends TestCase
+=20
+ public function testSolverUpdateFullyConstrainedPrunesInstalledPackag=
es(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
+- $this->repoLocked->addPackage($packageB =3D self::getPackage('B',=
'1.0'));
+- $this->repo->addPackage($newPackageA =3D self::getPackage('A', '1=
=2E2'));
+- $this->repo->addPackage(self::getPackage('A', '2.0'));
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
++ $this->repoLocked->addPackage($packageB =3D self::getPackage('b/b=
', '1.0'));
++ $this->repo->addPackage($newPackageA =3D self::getPackage('a/a', =
'1.2'));
++ $this->repo->addPackage(self::getPackage('a/a', '2.0'));
+ $this->reposComplete();
+=20
+- $this->request->requireName('A', self::getVersionConstraint('<', =
'2.0.0.0'));
++ $this->request->requireName('a/a', self::getVersionConstraint('<'=
, '2.0.0.0'));
+=20
+ $this->checkSolverResult([
+ [
+@@ -454,20 +454,20 @@ class SolverTest extends TestCase
+=20
+ public function testSolverAllJobs(): void
+ {
+- $this->repoLocked->addPackage($packageD =3D self::getPackage('D',=
'1.0'));
+- $this->repoLocked->addPackage($oldPackageC =3D self::getPackage('=
C', '1.0'));
++ $this->repoLocked->addPackage($packageD =3D self::getPackage('d/d=
', '1.0'));
++ $this->repoLocked->addPackage($oldPackageC =3D self::getPackage('=
c/c', '1.0'));
+=20
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '2.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $this->repo->addPackage($newPackageB =3D self::getPackage('B', '1=
=2E1'));
+- $this->repo->addPackage($packageC =3D self::getPackage('C', '1.1'=
));
+- $this->repo->addPackage(self::getPackage('D', '1.0'));
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('<', '1.1'), Link::TYPE_REQUIRE)]);
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '2.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $this->repo->addPackage($newPackageB =3D self::getPackage('b/b', =
'1.1'));
++ $this->repo->addPackage($packageC =3D self::getPackage('c/c', '1.=
1'));
++ $this->repo->addPackage(self::getPackage('d/d', '1.0'));
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('<', '1.1'), Link::TYPE_REQUIRE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
+- $this->request->requireName('C');
++ $this->request->requireName('a/a');
++ $this->request->requireName('c/c');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'remove', 'package' =3D> $packageD],
+@@ -479,16 +479,16 @@ class SolverTest extends TestCase
+=20
+ public function testSolverThreeAlternativeRequireAndConflict(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '2.0'=
));
+- $this->repo->addPackage($middlePackageB =3D self::getPackage('B',=
'1.0'));
+- $this->repo->addPackage($newPackageB =3D self::getPackage('B', '1=
=2E1'));
+- $this->repo->addPackage($oldPackageB =3D self::getPackage('B', '0=
=2E9'));
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('<', '1.1'), Link::TYPE_REQUIRE)]);
+- $packageA->setConflicts(['b' =3D> new Link('A', 'B', self::getVer=
sionConstraint('<', '1.0'), Link::TYPE_CONFLICT)]);
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '2.=
0'));
++ $this->repo->addPackage($middlePackageB =3D self::getPackage('b/b=
', '1.0'));
++ $this->repo->addPackage($newPackageB =3D self::getPackage('b/b', =
'1.1'));
++ $this->repo->addPackage($oldPackageB =3D self::getPackage('b/b', =
'0.9'));
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('<', '1.1'), Link::TYPE_REQUIRE)]);
++ $packageA->setConflicts(['b/b' =3D> new Link('a/a', 'b/b', self::=
getVersionConstraint('<', '1.0'), Link::TYPE_CONFLICT)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $middlePackageB],
+@@ -498,13 +498,13 @@ class SolverTest extends TestCase
+=20
+ public function testSolverObsolete(): void
+ {
+- $this->repoLocked->addPackage($packageA =3D self::getPackage('A',=
'1.0'));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $packageB->setReplaces(['a' =3D> new Link('B', 'A', new MatchAllC=
onstraint())]);
++ $this->repoLocked->addPackage($packageA =3D self::getPackage('a/a=
', '1.0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $packageB->setReplaces(['a/a' =3D> new Link('b/b', 'a/a', new Mat=
chAllConstraint())]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('B');
++ $this->request->requireName('b/b');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'remove', 'package' =3D> $packageA],
+@@ -514,12 +514,12 @@ class SolverTest extends TestCase
+=20
+ public function testInstallOneOfTwoAlternatives(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('A', '1.0'=
));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('a/a', '1.=
0'));
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageA],
+@@ -528,14 +528,14 @@ class SolverTest extends TestCase
+=20
+ public function testInstallProvider(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageQ =3D self::getPackage('Q', '1.0'=
));
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
+- $packageQ->setProvides(['b' =3D> new Link('Q', 'B', self::getVers=
ionConstraint('=3D', '1.0'), Link::TYPE_PROVIDE)]);
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageQ =3D self::getPackage('q/q', '1.=
0'));
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
++ $packageQ->setProvides(['b/b' =3D> new Link('q/q', 'b/b', self::g=
etVersionConstraint('=3D', '1.0'), Link::TYPE_PROVIDE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ // must explicitly pick the provider, so error in this case
+ self::expectException('Composer\DependencyResolver\SolverProblems=
Exception');
+@@ -545,15 +545,15 @@ class SolverTest extends TestCase
+=20
+ public function testSkipReplacerOfExistingPackage(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageQ =3D self::getPackage('Q', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
+- $packageQ->setReplaces(['b' =3D> new Link('Q', 'B', self::getVers=
ionConstraint('>=3D', '1.0'), Link::TYPE_REPLACE)]);
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageQ =3D self::getPackage('q/q', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
++ $packageQ->setReplaces(['b/b' =3D> new Link('q/q', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0'), Link::TYPE_REPLACE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageB],
+@@ -563,14 +563,14 @@ class SolverTest extends TestCase
+=20
+ public function testNoInstallReplacerOfMissingPackage(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageQ =3D self::getPackage('Q', '1.0'=
));
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
+- $packageQ->setReplaces(['b' =3D> new Link('Q', 'B', self::getVers=
ionConstraint('>=3D', '1.0'), Link::TYPE_REPLACE)]);
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageQ =3D self::getPackage('q/q', '1.=
0'));
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
++ $packageQ->setReplaces(['b/b' =3D> new Link('q/q', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0'), Link::TYPE_REPLACE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ self::expectException('Composer\DependencyResolver\SolverProblems=
Exception');
+ $this->createSolver();
+@@ -579,16 +579,16 @@ class SolverTest extends TestCase
+=20
+ public function testSkipReplacedPackageIfReplacerIsSelected(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageQ =3D self::getPackage('Q', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
+- $packageQ->setReplaces(['b' =3D> new Link('Q', 'B', self::getVers=
ionConstraint('>=3D', '1.0'), Link::TYPE_REPLACE)]);
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageQ =3D self::getPackage('q/q', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
++ $packageQ->setReplaces(['b/b' =3D> new Link('q/q', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0'), Link::TYPE_REPLACE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
+- $this->request->requireName('Q');
++ $this->request->requireName('a/a');
++ $this->request->requireName('q/q');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageQ],
+@@ -598,34 +598,34 @@ class SolverTest extends TestCase
+=20
+ public function testPickOlderIfNewerConflicts(): void
+ {
+- $this->repo->addPackage($packageX =3D self::getPackage('X', '1.0'=
));
++ $this->repo->addPackage($packageX =3D self::getPackage('x/x', '1.=
0'));
+ $packageX->setRequires([
+- 'a' =3D> new Link('X', 'A', self::getVersionConstraint('>=3D'=
, '2.0.0.0'), Link::TYPE_REQUIRE),
+- 'b' =3D> new Link('X', 'B', self::getVersionConstraint('>=3D'=
, '2.0.0.0'), Link::TYPE_REQUIRE),
++ 'a/a' =3D> new Link('x/x', 'a/a', self::getVersionConstraint(=
'>=3D', '2.0.0.0'), Link::TYPE_REQUIRE),
++ 'b/b' =3D> new Link('x/x', 'b/b', self::getVersionConstraint(=
'>=3D', '2.0.0.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '2.0.=
0'));
+- $this->repo->addPackage($newPackageA =3D self::getPackage('A', '2=
=2E1.0'));
+- $this->repo->addPackage($newPackageB =3D self::getPackage('B', '2=
=2E1.0'));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '2.=
0.0'));
++ $this->repo->addPackage($newPackageA =3D self::getPackage('a/a', =
'2.1.0'));
++ $this->repo->addPackage($newPackageB =3D self::getPackage('b/b', =
'2.1.0'));
+=20
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('>=3D', '2.0.0.0'), Link::TYPE_REQUIRE)]);
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('>=3D', '2.0.0.0'), Link::TYPE_REQUIRE)]);
+=20
+ // new package A depends on version of package B that does not ex=
ist
+ // =3D> new package A is not installable
+- $newPackageA->setRequires(['b' =3D> new Link('A', 'B', self::getV=
ersionConstraint('>=3D', '2.2.0.0'), Link::TYPE_REQUIRE)]);
++ $newPackageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self=
::getVersionConstraint('>=3D', '2.2.0.0'), Link::TYPE_REQUIRE)]);
+=20
+ // add a package S replacing both A and B, so that S and B or S a=
nd A cannot be simultaneously installed
+ // but an alternative option for A and B both exists
+ // this creates a more difficult so solve conflict
+- $this->repo->addPackage($packageS =3D self::getPackage('S', '2.0.=
0'));
++ $this->repo->addPackage($packageS =3D self::getPackage('s/s', '2.=
0.0'));
+ $packageS->setReplaces([
+- 'a' =3D> new Link('S', 'A', self::getVersionConstraint('>=3D'=
, '2.0.0.0'), Link::TYPE_REPLACE),
+- 'b' =3D> new Link('S', 'B', self::getVersionConstraint('>=3D'=
, '2.0.0.0'), Link::TYPE_REPLACE),
++ 'a/a' =3D> new Link('s/s', 'a/a', self::getVersionConstraint(=
'>=3D', '2.0.0.0'), Link::TYPE_REPLACE),
++ 'b/b' =3D> new Link('s/s', 'b/b', self::getVersionConstraint(=
'>=3D', '2.0.0.0'), Link::TYPE_REPLACE),
+ ]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('X');
++ $this->request->requireName('x/x');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $newPackageB],
+@@ -636,15 +636,15 @@ class SolverTest extends TestCase
+=20
+ public function testInstallCircularRequire(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB1 =3D self::getPackage('B', '0.9=
'));
+- $this->repo->addPackage($packageB2 =3D self::getPackage('B', '1.1=
'));
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
+- $packageB2->setRequires(['a' =3D> new Link('B', 'A', self::getVer=
sionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB1 =3D self::getPackage('b/b', '0=
=2E9'));
++ $this->repo->addPackage($packageB2 =3D self::getPackage('b/b', '1=
=2E1'));
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
++ $packageB2->setRequires(['a/a' =3D> new Link('b/b', 'a/a', self::=
getVersionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageB2],
+@@ -654,22 +654,22 @@ class SolverTest extends TestCase
+=20
+ public function testInstallAlternativeWithCircularRequire(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $this->repo->addPackage($packageC =3D self::getPackage('C', '1.0'=
));
+- $this->repo->addPackage($packageD =3D self::getPackage('D', '1.0'=
));
+- $packageA->setRequires(['b' =3D> new Link('A', 'B', self::getVers=
ionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
+- $packageB->setRequires(['virtual' =3D> new Link('B', 'Virtual', s=
elf::getVersionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
+- $packageC->setProvides(['virtual' =3D> new Link('C', 'Virtual', s=
elf::getVersionConstraint('=3D=3D', '1.0'), Link::TYPE_PROVIDE)]);
+- $packageD->setProvides(['virtual' =3D> new Link('D', 'Virtual', s=
elf::getVersionConstraint('=3D=3D', '1.0'), Link::TYPE_PROVIDE)]);
+-
+- $packageC->setRequires(['a' =3D> new Link('C', 'A', self::getVers=
ionConstraint('=3D=3D', '1.0'), Link::TYPE_REQUIRE)]);
+- $packageD->setRequires(['a' =3D> new Link('D', 'A', self::getVers=
ionConstraint('=3D=3D', '1.0'), Link::TYPE_REQUIRE)]);
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $this->repo->addPackage($packageC =3D self::getPackage('c/c', '1.=
0'));
++ $this->repo->addPackage($packageD =3D self::getPackage('d/d', '1.=
0'));
++ $packageA->setRequires(['b/b' =3D> new Link('a/a', 'b/b', self::g=
etVersionConstraint('>=3D', '1.0'), Link::TYPE_REQUIRE)]);
++ $packageB->setRequires(['virtual/virtual' =3D> new Link('b/b', 'v=
irtual/virtual', self::getVersionConstraint('>=3D', '1.0'), Link::TYPE_REQU=
IRE)]);
++ $packageC->setProvides(['virtual/virtual' =3D> new Link('c/c', 'v=
irtual/virtual', self::getVersionConstraint('=3D=3D', '1.0'), Link::TYPE_PR=
OVIDE)]);
++ $packageD->setProvides(['virtual/virtual' =3D> new Link('d/d', 'v=
irtual/virtual', self::getVersionConstraint('=3D=3D', '1.0'), Link::TYPE_PR=
OVIDE)]);
++
++ $packageC->setRequires(['a/a' =3D> new Link('c/c', 'a/a', self::g=
etVersionConstraint('=3D=3D', '1.0'), Link::TYPE_REQUIRE)]);
++ $packageD->setRequires(['a/a' =3D> new Link('d/d', 'a/a', self::g=
etVersionConstraint('=3D=3D', '1.0'), Link::TYPE_REQUIRE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
+- $this->request->requireName('C');
++ $this->request->requireName('a/a');
++ $this->request->requireName('c/c');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageB],
+@@ -684,30 +684,30 @@ class SolverTest extends TestCase
+ */
+ public function testUseReplacerIfNecessary(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $this->repo->addPackage($packageD =3D self::getPackage('D', '1.0'=
));
+- $this->repo->addPackage($packageD2 =3D self::getPackage('D', '1.1=
'));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $this->repo->addPackage($packageD =3D self::getPackage('d/d', '1.=
0'));
++ $this->repo->addPackage($packageD2 =3D self::getPackage('d/d', '1=
=2E1'));
+=20
+ $packageA->setRequires([
+- 'b' =3D> new Link('A', 'B', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
+- 'c' =3D> new Link('A', 'C', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
++ 'b/b' =3D> new Link('a/a', 'b/b', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
++ 'c/c' =3D> new Link('a/a', 'c/c', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $packageD->setReplaces([
+- 'b' =3D> new Link('D', 'B', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REPLACE),
+- 'c' =3D> new Link('D', 'C', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REPLACE),
++ 'b/b' =3D> new Link('d/d', 'b/b', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REPLACE),
++ 'c/c' =3D> new Link('d/d', 'c/c', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REPLACE),
+ ]);
+=20
+ $packageD2->setReplaces([
+- 'b' =3D> new Link('D', 'B', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REPLACE),
+- 'c' =3D> new Link('D', 'C', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REPLACE),
++ 'b/b' =3D> new Link('d/d', 'b/b', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REPLACE),
++ 'c/c' =3D> new Link('d/d', 'c/c', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REPLACE),
+ ]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
+- $this->request->requireName('D');
++ $this->request->requireName('a/a');
++ $this->request->requireName('d/d');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageD2],
+@@ -717,32 +717,32 @@ class SolverTest extends TestCase
+=20
+ public function testIssue265(): void
+ {
+- $this->repo->addPackage($packageA1 =3D self::getPackage('A', '2.0=
=2E999999-dev'));
+- $this->repo->addPackage($packageA2 =3D self::getPackage('A', '2.1=
-dev'));
+- $this->repo->addPackage($packageA3 =3D self::getPackage('A', '2.2=
-dev'));
+- $this->repo->addPackage($packageB1 =3D self::getPackage('B', '2.0=
=2E10'));
+- $this->repo->addPackage($packageB2 =3D self::getPackage('B', '2.0=
=2E9'));
+- $this->repo->addPackage($packageC =3D self::getPackage('C', '2.0-=
dev'));
+- $this->repo->addPackage($packageD =3D self::getPackage('D', '2.0.=
9'));
++ $this->repo->addPackage($packageA1 =3D self::getPackage('a/a', '2=
=2E0.999999-dev'));
++ $this->repo->addPackage($packageA2 =3D self::getPackage('a/a', '2=
=2E1-dev'));
++ $this->repo->addPackage($packageA3 =3D self::getPackage('a/a', '2=
=2E2-dev'));
++ $this->repo->addPackage($packageB1 =3D self::getPackage('b/b', '2=
=2E0.10'));
++ $this->repo->addPackage($packageB2 =3D self::getPackage('b/b', '2=
=2E0.9'));
++ $this->repo->addPackage($packageC =3D self::getPackage('c/c', '2.=
0-dev'));
++ $this->repo->addPackage($packageD =3D self::getPackage('d/d', '2.=
0.9'));
+=20
+ $packageC->setRequires([
+- 'a' =3D> new Link('C', 'A', self::getVersionConstraint('>=3D'=
, '2.0'), Link::TYPE_REQUIRE),
+- 'd' =3D> new Link('C', 'D', self::getVersionConstraint('>=3D'=
, '2.0'), Link::TYPE_REQUIRE),
++ 'a/a' =3D> new Link('c/c', 'a/a', self::getVersionConstraint(=
'>=3D', '2.0'), Link::TYPE_REQUIRE),
++ 'd/d' =3D> new Link('c/c', 'd/d', self::getVersionConstraint(=
'>=3D', '2.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $packageD->setRequires([
+- 'a' =3D> new Link('D', 'A', self::getVersionConstraint('>=3D'=
, '2.1'), Link::TYPE_REQUIRE),
+- 'b' =3D> new Link('D', 'B', self::getVersionConstraint('>=3D'=
, '2.0-dev'), Link::TYPE_REQUIRE),
++ 'a/a' =3D> new Link('d/d', 'a/a', self::getVersionConstraint(=
'>=3D', '2.1'), Link::TYPE_REQUIRE),
++ 'b/b' =3D> new Link('d/d', 'b/b', self::getVersionConstraint(=
'>=3D', '2.0-dev'), Link::TYPE_REQUIRE),
+ ]);
+=20
+- $packageB1->setRequires(['a' =3D> new Link('B', 'A', self::getVer=
sionConstraint('=3D=3D', '2.1.0.0-dev'), Link::TYPE_REQUIRE)]);
+- $packageB2->setRequires(['a' =3D> new Link('B', 'A', self::getVer=
sionConstraint('=3D=3D', '2.1.0.0-dev'), Link::TYPE_REQUIRE)]);
++ $packageB1->setRequires(['a/a' =3D> new Link('b/b', 'a/a', self::=
getVersionConstraint('=3D=3D', '2.1.0.0-dev'), Link::TYPE_REQUIRE)]);
++ $packageB2->setRequires(['a/a' =3D> new Link('b/b', 'a/a', self::=
getVersionConstraint('=3D=3D', '2.1.0.0-dev'), Link::TYPE_REQUIRE)]);
+=20
+- $packageB2->setReplaces(['d' =3D> new Link('B', 'D', self::getVer=
sionConstraint('=3D=3D', '2.0.9.0'), Link::TYPE_REPLACE)]);
++ $packageB2->setReplaces(['d/d' =3D> new Link('b/b', 'd/d', self::=
getVersionConstraint('=3D=3D', '2.0.9.0'), Link::TYPE_REPLACE)]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('C', self::getVersionConstraint('=3D=
=3D', '2.0.0.0-dev'));
++ $this->request->requireName('c/c', self::getVersionConstraint('=
=3D=3D', '2.0.0.0-dev'));
+=20
+ self::expectException('Composer\DependencyResolver\SolverProblems=
Exception');
+=20
+@@ -752,10 +752,10 @@ class SolverTest extends TestCase
+=20
+ public function testConflictResultEmpty(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
+ $packageA->setConflicts([
+- 'b' =3D> new Link('A', 'B', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_CONFLICT),
++ 'b/b' =3D> new Link('a/a', 'b/b', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_CONFLICT),
+ ]);
+=20
+ $this->reposComplete();
+@@ -763,8 +763,8 @@ class SolverTest extends TestCase
+ $emptyConstraint =3D new MatchAllConstraint();
+ $emptyConstraint->setPrettyString('*');
+=20
+- $this->request->requireName('A', $emptyConstraint);
+- $this->request->requireName('B', $emptyConstraint);
++ $this->request->requireName('a/a', $emptyConstraint);
++ $this->request->requireName('b/b', $emptyConstraint);
+=20
+ $this->createSolver();
+ try {
+@@ -776,25 +776,25 @@ class SolverTest extends TestCase
+=20
+ $msg =3D "\n";
+ $msg .=3D " Problem 1\n";
+- $msg .=3D " - Root composer.json requires a * -> satisfiab=
le by A[1.0].\n";
+- $msg .=3D " - Root composer.json requires b * -> satisfiab=
le by B[1.0].\n";
+- $msg .=3D " - A 1.0 conflicts with B 1.0.\n";
++ $msg .=3D " - Root composer.json requires a/a * -> satisfi=
able by a/a[1.0].\n";
++ $msg .=3D " - Root composer.json requires b/b * -> satisfi=
able by b/b[1.0].\n";
++ $msg .=3D " - a/a 1.0 conflicts with b/b 1.0.\n";
+ self::assertEquals($msg, $e->getPrettyString($this->repoSet, =
$this->request, $this->pool, false));
+ }
+ }
+=20
+ public function testUnsatisfiableRequires(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
+=20
+ $packageA->setRequires([
+- 'b' =3D> new Link('A', 'B', self::getVersionConstraint('>=3D'=
, '2.0'), Link::TYPE_REQUIRE),
++ 'b/b' =3D> new Link('a/a', 'b/b', self::getVersionConstraint(=
'>=3D', '2.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->createSolver();
+ try {
+@@ -807,31 +807,31 @@ class SolverTest extends TestCase
+=20
+ $msg =3D "\n";
+ $msg .=3D " Problem 1\n";
+- $msg .=3D " - Root composer.json requires a * -> satisfiab=
le by A[1.0].\n";
+- $msg .=3D " - A 1.0 requires b >=3D 2.0 -> found B[1.0] bu=
t it does not match the constraint.\n";
++ $msg .=3D " - Root composer.json requires a/a * -> satisfi=
able by a/a[1.0].\n";
++ $msg .=3D " - a/a 1.0 requires b/b >=3D 2.0 -> found b/b[1=
=2E0] but it does not match the constraint.\n";
+ self::assertEquals($msg, $e->getPrettyString($this->repoSet, =
$this->request, $this->pool, false));
+ }
+ }
+=20
+ public function testRequireMismatchException(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $this->repo->addPackage($packageB2 =3D self::getPackage('B', '0.9=
'));
+- $this->repo->addPackage($packageC =3D self::getPackage('C', '1.0'=
));
+- $this->repo->addPackage($packageD =3D self::getPackage('D', '1.0'=
));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $this->repo->addPackage($packageB2 =3D self::getPackage('b/b', '0=
=2E9'));
++ $this->repo->addPackage($packageC =3D self::getPackage('c/c', '1.=
0'));
++ $this->repo->addPackage($packageD =3D self::getPackage('d/d', '1.=
0'));
+=20
+ $packageA->setRequires([
+- 'b' =3D> new Link('A', 'B', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
++ 'b/b' =3D> new Link('a/a', 'b/b', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+ $packageB->setRequires([
+- 'c' =3D> new Link('B', 'C', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
++ 'c/c' =3D> new Link('b/b', 'c/c', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+ $packageC->setRequires([
+- 'd' =3D> new Link('C', 'D', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
++ 'd/d' =3D> new Link('c/c', 'd/d', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+ $packageD->setRequires([
+- 'b' =3D> new Link('D', 'B', self::getVersionConstraint('<', '=
1.0'), Link::TYPE_REQUIRE),
++ 'b/b' =3D> new Link('d/d', 'b/b', self::getVersionConstraint(=
'<', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $this->reposComplete();
+@@ -839,7 +839,7 @@ class SolverTest extends TestCase
+ $emptyConstraint =3D new MatchAllConstraint();
+ $emptyConstraint->setPrettyString('*');
+=20
+- $this->request->requireName('A', $emptyConstraint);
++ $this->request->requireName('a/a', $emptyConstraint);
+=20
+ $this->createSolver();
+ try {
+@@ -851,12 +851,12 @@ class SolverTest extends TestCase
+=20
+ $msg =3D "\n";
+ $msg .=3D " Problem 1\n";
+- $msg .=3D " - Root composer.json requires a * -> satisfiab=
le by A[1.0].\n";
+- $msg .=3D " - A 1.0 requires b >=3D 1.0 -> satisfiable by =
B[1.0].\n";
+- $msg .=3D " - B 1.0 requires c >=3D 1.0 -> satisfiable by =
C[1.0].\n";
+- $msg .=3D " - C 1.0 requires d >=3D 1.0 -> satisfiable by =
D[1.0].\n";
+- $msg .=3D " - D 1.0 requires b < 1.0 -> satisfiable by B[0=
=2E9].\n";
+- $msg .=3D " - You can only install one version of a packag=
e, so only one of these can be installed: B[0.9, 1.0].\n";
++ $msg .=3D " - Root composer.json requires a/a * -> satisfi=
able by a/a[1.0].\n";
++ $msg .=3D " - a/a 1.0 requires b/b >=3D 1.0 -> satisfiable=
by b/b[1.0].\n";
++ $msg .=3D " - b/b 1.0 requires c/c >=3D 1.0 -> satisfiable=
by c/c[1.0].\n";
++ $msg .=3D " - c/c 1.0 requires d/d >=3D 1.0 -> satisfiable=
by d/d[1.0].\n";
++ $msg .=3D " - d/d 1.0 requires b/b < 1.0 -> satisfiable by=
b/b[0.9].\n";
++ $msg .=3D " - You can only install one version of a packag=
e, so only one of these can be installed: b/b[0.9, 1.0].\n";
+ self::assertEquals($msg, $e->getPrettyString($this->repoSet, =
$this->request, $this->pool, false));
+ }
+ }
+@@ -890,22 +890,22 @@ class SolverTest extends TestCase
+=20
+ public function testInstallRecursiveAliasDependencies(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '2.0'=
));
+- $this->repo->addPackage($packageA2 =3D self::getPackage('A', '2.0=
'));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '2.=
0'));
++ $this->repo->addPackage($packageA2 =3D self::getPackage('a/a', '2=
=2E0'));
+=20
+ $packageA2->setRequires([
+- 'b' =3D> new Link('A', 'B', self::getVersionConstraint('=3D=
=3D', '2.0'), Link::TYPE_REQUIRE, '=3D=3D 2.0'),
++ 'b/b' =3D> new Link('a/a', 'b/b', self::getVersionConstraint(=
'=3D=3D', '2.0'), Link::TYPE_REQUIRE, '=3D=3D 2.0'),
+ ]);
+ $packageB->setRequires([
+- 'a' =3D> new Link('B', 'A', self::getVersionConstraint('>=3D'=
, '2.0'), Link::TYPE_REQUIRE),
++ 'a/a' =3D> new Link('b/b', 'a/a', self::getVersionConstraint(=
'>=3D', '2.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $this->repo->addPackage($packageA2Alias =3D self::getAliasPackage=
($packageA2, '1.1'));
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A', self::getVersionConstraint('=3D=
=3D', '1.1.0.0'));
++ $this->request->requireName('a/a', self::getVersionConstraint('=
=3D=3D', '1.1.0.0'));
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageB],
+@@ -916,19 +916,19 @@ class SolverTest extends TestCase
+=20
+ public function testInstallDevAlias(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '2.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '2.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
+=20
+ $packageB->setRequires([
+- 'a' =3D> new Link('B', 'A', self::getVersionConstraint('<', '=
2.0'), Link::TYPE_REQUIRE),
++ 'a/a' =3D> new Link('b/b', 'a/a', self::getVersionConstraint(=
'<', '2.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $this->repo->addPackage($packageAAlias =3D self::getAliasPackage(=
$packageA, '1.1'));
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A', self::getVersionConstraint('=3D=
=3D', '2.0'));
+- $this->request->requireName('B');
++ $this->request->requireName('a/a', self::getVersionConstraint('=
=3D=3D', '2.0'));
++ $this->request->requireName('b/b');
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageA],
+@@ -940,22 +940,22 @@ class SolverTest extends TestCase
+ public function testInstallRootAliasesIfAliasOfIsInstalled(): void
+ {
+ // root aliased, required
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
+ $this->repo->addPackage($packageAAlias =3D self::getAliasPackage(=
$packageA, '1.1'));
+ $packageAAlias->setRootPackageAlias(true);
+ // root aliased, not required, should still be installed as it is=
root alias
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
+ $this->repo->addPackage($packageBAlias =3D self::getAliasPackage(=
$packageB, '1.1'));
+ $packageBAlias->setRootPackageAlias(true);
+ // regular alias, not required, alias should not be installed
+- $this->repo->addPackage($packageC =3D self::getPackage('C', '1.0'=
));
++ $this->repo->addPackage($packageC =3D self::getPackage('c/c', '1.=
0'));
+ $this->repo->addPackage($packageCAlias =3D self::getAliasPackage(=
$packageC, '1.1'));
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A', self::getVersionConstraint('=3D=
=3D', '1.1'));
+- $this->request->requireName('B', self::getVersionConstraint('=3D=
=3D', '1.0'));
+- $this->request->requireName('C', self::getVersionConstraint('=3D=
=3D', '1.0'));
++ $this->request->requireName('a/a', self::getVersionConstraint('=
=3D=3D', '1.1'));
++ $this->request->requireName('b/b', self::getVersionConstraint('=
=3D=3D', '1.0'));
++ $this->request->requireName('c/c', self::getVersionConstraint('=
=3D=3D', '1.0'));
+=20
+ $this->checkSolverResult([
+ ['job' =3D> 'install', 'package' =3D> $packageA],
+@@ -978,47 +978,47 @@ class SolverTest extends TestCase
+ */
+ public function testLearnPositiveLiteral(): void
+ {
+- $this->repo->addPackage($packageA =3D self::getPackage('A', '1.0'=
));
+- $this->repo->addPackage($packageB =3D self::getPackage('B', '1.0'=
));
+- $this->repo->addPackage($packageC1 =3D self::getPackage('C', '1.0=
'));
+- $this->repo->addPackage($packageC2 =3D self::getPackage('C', '2.0=
'));
+- $this->repo->addPackage($packageD =3D self::getPackage('D', '1.0'=
));
+- $this->repo->addPackage($packageE =3D self::getPackage('E', '1.0'=
));
+- $this->repo->addPackage($packageF1 =3D self::getPackage('F', '1.0=
'));
+- $this->repo->addPackage($packageF2 =3D self::getPackage('F', '2.0=
'));
+- $this->repo->addPackage($packageG1 =3D self::getPackage('G', '1.0=
'));
+- $this->repo->addPackage($packageG2 =3D self::getPackage('G', '2.0=
'));
+- $this->repo->addPackage($packageG3 =3D self::getPackage('G', '3.0=
'));
++ $this->repo->addPackage($packageA =3D self::getPackage('a/a', '1.=
0'));
++ $this->repo->addPackage($packageB =3D self::getPackage('b/b', '1.=
0'));
++ $this->repo->addPackage($packageC1 =3D self::getPackage('c/c', '1=
=2E0'));
++ $this->repo->addPackage($packageC2 =3D self::getPackage('c/c', '2=
=2E0'));
++ $this->repo->addPackage($packageD =3D self::getPackage('d/d', '1.=
0'));
++ $this->repo->addPackage($packageE =3D self::getPackage('e/e', '1.=
0'));
++ $this->repo->addPackage($packageF1 =3D self::getPackage('f/f', '1=
=2E0'));
++ $this->repo->addPackage($packageF2 =3D self::getPackage('f/f', '2=
=2E0'));
++ $this->repo->addPackage($packageG1 =3D self::getPackage('g/g', '1=
=2E0'));
++ $this->repo->addPackage($packageG2 =3D self::getPackage('g/g', '2=
=2E0'));
++ $this->repo->addPackage($packageG3 =3D self::getPackage('g/g', '3=
=2E0'));
+=20
+ $packageA->setRequires([
+- 'b' =3D> new Link('A', 'B', self::getVersionConstraint('=3D=
=3D', '1.0'), Link::TYPE_REQUIRE),
+- 'c' =3D> new Link('A', 'C', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
+- 'd' =3D> new Link('A', 'D', self::getVersionConstraint('=3D=
=3D', '1.0'), Link::TYPE_REQUIRE),
++ 'b/b' =3D> new Link('a/a', 'b/b', self::getVersionConstraint(=
'=3D=3D', '1.0'), Link::TYPE_REQUIRE),
++ 'c/c' =3D> new Link('a/a', 'c/c', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
++ 'd/d' =3D> new Link('a/a', 'd/d', self::getVersionConstraint(=
'=3D=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $packageB->setRequires([
+- 'e' =3D> new Link('B', 'E', self::getVersionConstraint('=3D=
=3D', '1.0'), Link::TYPE_REQUIRE),
++ 'e/e' =3D> new Link('b/b', 'e/e', self::getVersionConstraint(=
'=3D=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $packageC1->setRequires([
+- 'f' =3D> new Link('C', 'F', self::getVersionConstraint('=3D=
=3D', '1.0'), Link::TYPE_REQUIRE),
++ 'f/f' =3D> new Link('c/c', 'f/f', self::getVersionConstraint(=
'=3D=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+ $packageC2->setRequires([
+- 'f' =3D> new Link('C', 'F', self::getVersionConstraint('=3D=
=3D', '1.0'), Link::TYPE_REQUIRE),
+- 'g' =3D> new Link('C', 'G', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
++ 'f/f' =3D> new Link('c/c', 'f/f', self::getVersionConstraint(=
'=3D=3D', '1.0'), Link::TYPE_REQUIRE),
++ 'g/g' =3D> new Link('c/c', 'g/g', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $packageD->setRequires([
+- 'f' =3D> new Link('D', 'F', self::getVersionConstraint('>=3D'=
, '1.0'), Link::TYPE_REQUIRE),
++ 'f/f' =3D> new Link('d/d', 'f/f', self::getVersionConstraint(=
'>=3D', '1.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $packageE->setRequires([
+- 'g' =3D> new Link('E', 'G', self::getVersionConstraint('<=3D'=
, '2.0'), Link::TYPE_REQUIRE),
++ 'g/g' =3D> new Link('e/e', 'g/g', self::getVersionConstraint(=
'<=3D', '2.0'), Link::TYPE_REQUIRE),
+ ]);
+=20
+ $this->reposComplete();
+=20
+- $this->request->requireName('A');
++ $this->request->requireName('a/a');
+=20
+ $this->createSolver();
+=20
+diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/I=
nstallerTest.php
+index ae1383a..ae73ac4 100644
+--- a/tests/Composer/Test/InstallerTest.php
++++ b/tests/Composer/Test/InstallerTest.php
+@@ -178,13 +178,13 @@ class InstallerTest extends TestCase
+ // when A requires B and B requires A, and A is a non-published r=
oot package
+ // the install of B should succeed
+=20
+- $a =3D self::getPackage('A', '1.0.0', 'Composer\Package\RootPacka=
ge');
++ $a =3D self::getPackage('a/a', '1.0.0', 'Composer\Package\RootPac=
kage');
+ $a->setRequires([
+- 'b' =3D> new Link('A', 'B', $v =3D self::getVersionConstraint=
('=3D', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
++ 'b/b' =3D> new Link('a/a', 'b/b', $v =3D self::getVersionCons=
traint('=3D', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
+ ]);
+- $b =3D self::getPackage('B', '1.0.0');
++ $b =3D self::getPackage('b/b', '1.0.0');
+ $b->setRequires([
+- 'a' =3D> new Link('B', 'A', $v =3D self::getVersionConstraint=
('=3D', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
++ 'a/a' =3D> new Link('b/b', 'a/a', $v =3D self::getVersionCons=
traint('=3D', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
+ ]);
+=20
+ $cases[] =3D [
+@@ -198,13 +198,13 @@ class InstallerTest extends TestCase
+ // #480: when A requires B and B requires A, and A is a published=
root package
+ // only B should be installed, as A is the root
+=20
+- $a =3D self::getPackage('A', '1.0.0', 'Composer\Package\RootPacka=
ge');
++ $a =3D self::getPackage('a/a', '1.0.0', 'Composer\Package\RootPac=
kage');
+ $a->setRequires([
+- 'b' =3D> new Link('A', 'B', $v =3D self::getVersionConstraint=
('=3D', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
++ 'b/b' =3D> new Link('a/a', 'b/b', $v =3D self::getVersionCons=
traint('=3D', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
+ ]);
+- $b =3D self::getPackage('B', '1.0.0');
++ $b =3D self::getPackage('b/b', '1.0.0');
+ $b->setRequires([
+- 'a' =3D> new Link('B', 'A', $v =3D self::getVersionConstraint=
('=3D', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
++ 'a/a' =3D> new Link('b/b', 'a/a', $v =3D self::getVersionCons=
traint('=3D', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
+ ]);
+=20
+ $cases[] =3D [
+diff --git a/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.=
php b/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
+index 2477fa1..d1a9215 100644
+--- a/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
++++ b/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
+@@ -12,8 +12,10 @@
+=20
+ namespace Composer\Test\Package\Loader;
+=20
++use Composer\Exception\SecurityException;
+ use Composer\Package\Loader\ValidatingArrayLoader;
+ use Composer\Package\Loader\InvalidPackageException;
++use Composer\Package\PackageInterface;
+ use Composer\Test\TestCase;
+ use PHPUnit\Framework\Attributes\DataProvider;
+=20
+@@ -397,6 +399,25 @@ class ValidatingArrayLoaderTest extends TestCase
+ 'require.foo/Bar : a package cannot set a require on =
itself',
+ ],
+ ],
++ [
++ [
++ 'name' =3D> 'foo/bar',
++ 'bin' =3D> ['bin/foo', '../../../../etc/evil', 'neste=
d/../../escape'],
++ ],
++ [
++ 'bin.1 : invalid value (../../../../etc/evil), must n=
ot contain a ".." path component',
++ 'bin.2 : invalid value (nested/../../escape), must no=
t contain a ".." path component',
++ ],
++ ],
++ [
++ [
++ 'name' =3D> 'foo/bar',
++ 'bin' =3D> '../escape',
++ ],
++ [
++ 'bin : invalid value (../escape), must not contain a =
".." path component',
++ ],
++ ],
+ [
+ [
+ 'name' =3D> 'foo/bar',
+@@ -575,4 +596,72 @@ class ValidatingArrayLoaderTest extends TestCase
+ ],
+ ];
+ }
++
++ public function testValidatePackageAllowsValidPackages(): void
++ {
++ $package =3D self::getPackage('vendor/package', '1.0.0');
++ $package->setSourceType('git');
++ $package->setSourceUrl('https://example.org/vendor/package.git');
++ $package->setSourceReference('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaa');
++ $package->setDistType('zip');
++ $package->setDistUrl('https://example.org/vendor/package.zip');
++ $package->setDistReference('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaa');
++ $package->setBinaries(['bin/foo', 'console', 'some.bin']);
++ ValidatingArrayLoader::validatePackage($package);
++
++ // platform packages are accepted as-is, and the root package is =
skipped entirely
++ ValidatingArrayLoader::validatePackage(self::getPackage('php', '8=
=2E2.0'));
++ ValidatingArrayLoader::validatePackage(self::getRootPackage());
++
++ $this->expectNotToPerformAssertions();
++ }
++
++ /**
++ * @dataProvider provideMaliciousPackages
++ */
++ public function testValidatePackageRejectsMaliciousMetadata(PackageIn=
terface $package, string $expectedMessage): void
++ {
++ $this->expectException(SecurityException::class);
++ $this->expectExceptionMessage($expectedMessage);
++ ValidatingArrayLoader::validatePackage($package);
++ }
++
++ /**
++ * @return array<string, array{PackageInterface, string}>
++ */
++ public static function provideMaliciousPackages(): array
++ {
++ $badName =3D self::getPackage('--evil/pkg', '1.0.0');
++
++ $badSourceUrl =3D self::getPackage('vendor/pkg', '1.0.0');
++ $badSourceUrl->setSourceType('git');
++ $badSourceUrl->setSourceUrl('--upload-pack=3Dtouch /tmp/pwned');
++ $badSourceUrl->setSourceReference('main');
++
++ $badSourceReference =3D self::getPackage('vendor/pkg', '1.0.0');
++ $badSourceReference->setSourceType('git');
++ $badSourceReference->setSourceUrl('https://example.org/vendor/pkg=
=2Egit');
++ $badSourceReference->setSourceReference('--upload-pack=3Dtouch /t=
mp/pwned');
++
++ $badDistUrl =3D self::getPackage('vendor/pkg', '1.0.0');
++ $badDistUrl->setDistType('zip');
++ $badDistUrl->setDistUrl('-oProxyCommand=3Dtouch /tmp/pwned');
++
++ $badDistReference =3D self::getPackage('vendor/pkg', '1.0.0');
++ $badDistReference->setDistType('zip');
++ $badDistReference->setDistUrl('https://example.org/vendor/pkg.zip=
');
++ $badDistReference->setDistReference('--evil');
++
++ $badBin =3D self::getPackage('vendor/pkg', '1.0.0');
++ $badBin->setBinaries(['bin/ok', '../../../../escape-target.txt']);
++
++ return [
++ 'invalid name' =3D> [$badName, 'Invalid package found during =
dependency resolution'],
++ 'dash source.url' =3D> [$badSourceUrl, 'vendor/pkg has an inv=
alid source.url'],
++ 'dash source.reference' =3D> [$badSourceReference, 'vendor/pk=
g has an invalid source.reference'],
++ 'dash dist.url' =3D> [$badDistUrl, 'vendor/pkg has an invalid=
dist.url'],
++ 'dash dist.reference' =3D> [$badDistReference, 'vendor/pkg ha=
s an invalid dist.reference'],
++ 'bin path traversal' =3D> [$badBin, 'vendor/pkg has an invali=
d bin ../../../../escape-target.txt, it must not contain ".." path segments=
'],
++ ];
++ }
+ }
diff -Nru composer-2.8.8/debian/patches/0022-Modernize-PHPUnit-syntax.patch=
composer-2.8.8/debian/patches/0022-Modernize-PHPUnit-syntax.patch
--- composer-2.8.8/debian/patches/0022-Modernize-PHPUnit-syntax.patch 2026-=
05-14 10:37:03.000000000 +0200
+++ composer-2.8.8/debian/patches/0022-Modernize-PHPUnit-syntax.patch 1970-=
01-01 01:00:00.000000000 +0100
@@ -1,38 +0,0 @@
-From: =3D?utf-8?q?David_Pr=3DC3=3DA9vot?=3D <taffit@debian.org>
-Date: Fri, 29 Aug 2025 08:31:05 +0200
-Subject: Modernize PHPUnit syntax
-
----
- tests/Composer/Test/IO/BaseIOTest.php | 9 +++------
- 1 file changed, 3 insertions(+), 6 deletions(-)
-
-diff --git a/tests/Composer/Test/IO/BaseIOTest.php b/tests/Composer/Test/I=
O/BaseIOTest.php
-index b899d86..e22d8ea 100644
---- a/tests/Composer/Test/IO/BaseIOTest.php
-+++ b/tests/Composer/Test/IO/BaseIOTest.php
-@@ -15,12 +15,11 @@ namespace Composer\Test\IO;
- use Composer\Config;
- use Composer\IO\BufferIO;
- use Composer\Test\TestCase;
-+use PHPUnit\Framework\Attributes\DataProvider;
-=20
- class BaseIOTest extends TestCase
- {
-- /**
-- * @dataProvider provideValidGithubTokens
-- */
-+ #[DataProvider('provideValidGithubTokens')]
- public function testLoadConfigurationAcceptsValidGithubToken(string $=
token): void
- {
- $io =3D new BufferIO();
-@@ -55,9 +54,7 @@ class BaseIOTest extends TestCase
- ];
- }
-=20
-- /**
-- * @dataProvider provideUrlBreakingGithubTokens
-- */
-+ #[DataProvider('provideUrlBreakingGithubTokens')]
- public function testLoadConfigurationRejectsTokenWithUrlBreakingChara=
cters(string $token, string $offending): void
- {
- $io =3D new BufferIO();
diff -Nru composer-2.8.8/debian/patches/0023-Relax-token-validation-on-inpu=
t-and-hide-more-things.patch composer-2.8.8/debian/patches/0023-Relax-token=
-validation-on-input-and-hide-more-things.patch
--- composer-2.8.8/debian/patches/0023-Relax-token-validation-on-input-and-=
hide-more-things.patch 1970-01-01 01:00:00.000000000 +0100
+++ composer-2.8.8/debian/patches/0023-Relax-token-validation-on-input-and-=
hide-more-things.patch 2026-08-29 13:39:42.000000000 +0200
@@ -0,0 +1,131 @@
+From: Jordi Boggiano <j.boggiano@seld.be>
+Date: Thu, 28 May 2026 11:01:37 +0200
+Subject: Relax token validation on input,
+ and hide more things on output (#12886)
+
+---
+ src/Composer/IO/BaseIO.php | 6 -----
+ src/Composer/Util/ProcessExecutor.php | 3 +++
+ src/Composer/Util/Url.php | 3 +++
+ tests/Composer/Test/IO/BaseIOTest.php | 42 ------------------------------=
-----
+ tests/Composer/Test/Util/UrlTest.php | 4 ++++
+ 5 files changed, 10 insertions(+), 48 deletions(-)
+
+diff --git a/src/Composer/IO/BaseIO.php b/src/Composer/IO/BaseIO.php
+index 9650c96..8d3bc36 100644
+--- a/src/Composer/IO/BaseIO.php
++++ b/src/Composer/IO/BaseIO.php
+@@ -134,12 +134,6 @@ abstract class BaseIO implements IOInterface
+ $config->merge(['config' =3D> ['github-domains' =3D> arra=
y_merge($config->get('github-domains'), [$domain])]], 'implicit-due-to-auth=
');
+ }
+=20
+- // allowed chars for GH tokens are from https://github.blog/c=
hangelog/2021-03-04-authentication-token-format-updates/
+- // plus dots which were at some point used for GH app integra=
tion tokens
+- if (!Preg::isMatch('{^[.A-Za-z0-9_-]+$}', $token)) {
+- throw new \UnexpectedValueException('Your github oauth to=
ken for '.$domain.' contains invalid characters.');
+- }
+-
+ $this->checkAndSetAuthentication($domain, $token, 'x-oauth-ba=
sic');
+ }
+=20
+diff --git a/src/Composer/Util/ProcessExecutor.php b/src/Composer/Util/Pro=
cessExecutor.php
+index 91a5c40..ef8d4f2 100644
+--- a/src/Composer/Util/ProcessExecutor.php
++++ b/src/Composer/Util/ProcessExecutor.php
+@@ -490,6 +490,9 @@ class ProcessExecutor
+ if (Preg::isMatch('{^[a-f0-9]{12,}$}', $m['user'])) {
+ return '://***:***@';
+ }
++ if (strlen($m['user']) >=3D 12) {
++ return '://'.substr($m['user'], 0, 8).'***:***@';
++ }
+=20
+ return '://'.$m['user'].':***@';
+ }, $commandString);
+diff --git a/src/Composer/Util/Url.php b/src/Composer/Util/Url.php
+index 7e615fe..d210e7a 100644
+--- a/src/Composer/Util/Url.php
++++ b/src/Composer/Util/Url.php
+@@ -114,6 +114,9 @@ class Url
+ if (Preg::isMatch(GitHub::GITHUB_TOKEN_REGEX, $m['user'])) {
+ return $m['prefix'].'***:***@';
+ }
++ if (strlen($m['user']) >=3D 12) {
++ return $m['prefix'].substr($m['user'], 0, 8).'***:***@';
++ }
+=20
+ return $m['prefix'].$m['user'].':***@';
+ }, $url);
+diff --git a/tests/Composer/Test/IO/BaseIOTest.php b/tests/Composer/Test/I=
O/BaseIOTest.php
+index b899d86..7219837 100644
+--- a/tests/Composer/Test/IO/BaseIOTest.php
++++ b/tests/Composer/Test/IO/BaseIOTest.php
+@@ -54,46 +54,4 @@ class BaseIOTest extends TestCase
+ ],
+ ];
+ }
+-
+- /**
+- * @dataProvider provideUrlBreakingGithubTokens
+- */
+- public function testLoadConfigurationRejectsTokenWithUrlBreakingChara=
cters(string $token, string $offending): void
+- {
+- $io =3D new BufferIO();
+- $config =3D new Config(false);
+- $config->merge(['config' =3D> ['github-oauth' =3D> ['github.com' =
=3D> $token]]]);
+-
+- try {
+- $io->loadConfiguration($config);
+- self::fail('Expected loadConfiguration to reject token contai=
ning '.$offending);
+- } catch (\UnexpectedValueException $e) {
+- // Defect #1: the rejected token must not be echoed back into=
the
+- // exception message =E2=80=94 Symfony Console renders it to =
stderr and CI
+- // log shippers / GitHub Actions secret masking do not reliab=
ly
+- // strip it from the framed error block.
+- self::assertStringNotContainsString(
+- $token,
+- $e->getMessage(),
+- 'Exception message must not leak the rejected token value=
=2E'
+- );
+- }
+- }
+-
+- /** @return array<string, array{string, string}> */
+- public static function provideUrlBreakingGithubTokens(): array
+- {
+- return [
+- 'contains @ (userinfo separator)' =3D> ['ghp_AAAA@evil.exampl=
e.com', '@'],
+- 'contains : (basic-auth user:pass split)' =3D> ['ghp_AAAA:ext=
ra', ':'],
+- 'contains / (path separator)' =3D> ['ghp_AAA/BBB', '/'],
+- 'contains backslash' =3D> ['ghp_AAA\\BBB', '\\'],
+- 'contains ? (query separator)' =3D> ['ghp_AAA?x=3D1', '?'],
+- 'contains # (fragment)' =3D> ['ghp_AAA#frag', '#'],
+- 'contains space' =3D> ['ghp_AAA BBB', 'space'],
+- 'contains tab' =3D> ["ghp_AAA\tBBB", 'tab'],
+- 'contains CR' =3D> ["ghp_AAA\rBBB", 'CR'],
+- 'contains LF (header injection)' =3D> ["ghp_AAA\nX-Evil: 1", =
'LF'],
+- ];
+- }
+ }
+diff --git a/tests/Composer/Test/Util/UrlTest.php b/tests/Composer/Test/Ut=
il/UrlTest.php
+index 5d55dfa..fb54143 100644
+--- a/tests/Composer/Test/Util/UrlTest.php
++++ b/tests/Composer/Test/Util/UrlTest.php
+@@ -81,6 +81,8 @@ class UrlTest extends TestCase
+ ['https://example.org/foo/bar?foo=3Dbar&access_token=3D***', =
'https://example.org/foo/bar?foo=3Dbar&access_token=3Dabcdef'],
+ ['https://***:***@github.com/acme/repo', 'https://ghp_1234567=
890abcdefghijklmnopqrstuvwxyzAB:x-oauth-basic@github.com/acme/repo'],
+ ['https://***:***@github.com/acme/repo', 'https://github_pat_=
1234567890abcdefghijkl_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP=
QRSTUVW:x-oauth-basic@github.com/acme/repo'],
++ ['http://abcdefgh***:***@example.org:123/', 'http://abcdefghi=
jkl:bar@example.org:123/'],
++ ['https://abcdefgh***:***@example.org:123/', 'https://abcdefg=
hijklmnop:bar@example.org:123/'],
+ // without scheme
+ ['foo:***@example.org/', 'foo:bar@example.org/'],
+ ['foo@example.org/', 'foo@example.org/'],
+@@ -89,6 +91,8 @@ class UrlTest extends TestCase
+ ['foo:***@example.org:123/', 'foo:bar@example.org:123/'],
+ ['example.org/foo/bar?access_token=3D***', 'example.org/foo/b=
ar?access_token=3Dabcdef'],
+ ['example.org/foo/bar?foo=3Dbar&access_token=3D***', 'example=
=2Eorg/foo/bar?foo=3Dbar&access_token=3Dabcdef'],
++ ['abcdefgh***:***@example.org:123/', 'abcdefghijkl:bar@exampl=
e.org:123/'],
++ ['abcdefgh***:***@example.org:123/', 'abcdefghijklmnop:bar@ex=
ample.org:123/'],
+ ];
+ }
+ }
diff -Nru composer-2.8.8/debian/patches/0024-Merge-commit-from-fork.patch c=
omposer-2.8.8/debian/patches/0024-Merge-commit-from-fork.patch
--- composer-2.8.8/debian/patches/0024-Merge-commit-from-fork.patch 1970-01=
-01 01:00:00.000000000 +0100
+++ composer-2.8.8/debian/patches/0024-Merge-commit-from-fork.patch 2026-08=
-29 13:39:42.000000000 +0200
@@ -0,0 +1,280 @@
+From: Jordi Boggiano <j.boggiano@seld.be>
+Date: Wed, 1 Jul 2026 10:54:03 +0200
+Subject: Merge commit from fork
+
+* Sanitize URL-embedded usernames/tokens in verbose output
+
+AuthHelper::addAuthenticationOptions() wrote the HTTP-Basic username
+verbatim to the -vvv debug log. When a token is embedded in the URL user
+slot (e.g. https://ghp_TOKEN@host/...), it leaked in plaintext.
+
+Url::sanitize() and ProcessExecutor only matched the user:password@ form,
+so the documented user@ (no-password) form was not sanitized either.
+
+Consolidate the masking decision into Url::sanitizeUsername(): GitHub
+tokens and long hex strings keep only their first 3 chars, other 12char+
+values keep their first 8, short values and well-known non-secret markers
+(x-token-auth, gitlab-ci-token, ...) are shown verbatim. The marker list
+is now a shared Url::NON_SECRET_CREDENTIALS constant reused by
+Git::maskCredentials. AuthHelper's basic-auth display now runs through it.
+
+* Mask long (12char+) usernames to first 3 chars too
+
+Previously non-token 12char+ usernames kept their first 8 chars while
+GitHub tokens kept only 3. Treat both the same: keep only the first 3
+chars. The two branches now collapse into one condition.
+
+Origin: backport, https://github.com/composer/composer/commit/8887ad76fbd8=
30cb1861a2b1fd8ead78ed1fa1ec
+Bug: https://github.com/composer/composer/security/advisories/GHSA-g6xq-89=
2h-64w3
+Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-59947
+
+p
+---
+ src/Composer/Util/AuthHelper.php | 2 +-
+ src/Composer/Util/Git.php | 2 +-
+ src/Composer/Util/ProcessExecutor.php | 16 +++------
+ src/Composer/Util/Url.php | 43 +++++++++++++++++++=
-----
+ tests/Composer/Test/Util/AuthHelperTest.php | 43 +++++++++++++++++++=
+++++
+ tests/Composer/Test/Util/ProcessExecutorTest.php | 6 ++--
+ tests/Composer/Test/Util/UrlTest.php | 27 ++++++++++-----
+ 7 files changed, 108 insertions(+), 31 deletions(-)
+
+diff --git a/src/Composer/Util/AuthHelper.php b/src/Composer/Util/AuthHelp=
er.php
+index 3f03126..9ec9bbd 100644
+--- a/src/Composer/Util/AuthHelper.php
++++ b/src/Composer/Util/AuthHelper.php
+@@ -267,7 +267,7 @@ class AuthHelper
+ } else {
+ $authStr =3D base64_encode($auth['username'] . ':' . $aut=
h['password']);
+ $headers[] =3D 'Authorization: Basic '.$authStr;
+- $authenticationDisplayMessage =3D 'Using HTTP basic authe=
ntication with username "' . $auth['username'] . '"';
++ $authenticationDisplayMessage =3D 'Using HTTP basic authe=
ntication with username "' . Url::sanitizeUsername((string) $auth['username=
']) . '"';
+ }
+=20
+ if ($authenticationDisplayMessage && (!isset($this->displayed=
OriginAuthentications[$origin]) || $this->displayedOriginAuthentications[$o=
rigin] !=3D=3D $authenticationDisplayMessage)) {
+diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php
+index e340c1b..d43c846 100644
+--- a/src/Composer/Util/Git.php
++++ b/src/Composer/Util/Git.php
+@@ -612,7 +612,7 @@ class Git
+ $maskedCredentials =3D [];
+=20
+ foreach ($credentials as $credential) {
+- if (in_array($credential, ['private-token', 'x-token-auth', '=
oauth2', 'gitlab-ci-token', 'x-oauth-basic'])) {
++ if (in_array($credential, Url::NON_SECRET_CREDENTIALS, true))=
{
+ $maskedCredentials[] =3D $credential;
+ } elseif (strlen($credential) > 6) {
+ $maskedCredentials[] =3D substr($credential, 0, 3) . '...=
' . substr($credential, -3);
+diff --git a/src/Composer/Util/ProcessExecutor.php b/src/Composer/Util/Pro=
cessExecutor.php
+index ef8d4f2..e216e6a 100644
+--- a/src/Composer/Util/ProcessExecutor.php
++++ b/src/Composer/Util/ProcessExecutor.php
+@@ -482,19 +482,13 @@ class ProcessExecutor
+ }
+=20
+ $commandString =3D is_string($command) ? $command : implode(' ', =
array_map(self::class.'::escape', $command));
+- $safeCommand =3D Preg::replaceCallback('{://(?P<user>[^:/\s]+):(?=
P<password>[^@\s/]+)@}i', static function ($m): string {
+- // if the username looks like a long (12char+) hex string, or=
a modern github token (e.g. ghp_xxx, github_pat_xxx) we obfuscate that
+- if (Preg::isMatch(GitHub::GITHUB_TOKEN_REGEX, $m['user'])) {
+- return '://***:***@';
+- }
+- if (Preg::isMatch('{^[a-f0-9]{12,}$}', $m['user'])) {
+- return '://***:***@';
+- }
+- if (strlen($m['user']) >=3D 12) {
+- return '://'.substr($m['user'], 0, 8).'***:***@';
++ $safeCommand =3D Preg::replaceCallback('{://(?P<user>[^:/\s@]+)(?=
::(?P<password>[^@\s/]+))?@}i', static function ($m): string {
++ $user =3D Url::sanitizeUsername($m['user']);
++ if (($m['password'] ?? '') !=3D=3D '') {
++ return '://'.$user.':***@';
+ }
+=20
+- return '://'.$m['user'].':***@';
++ return '://'.$user.'@';
+ }, $commandString);
+ $safeCommand =3D Preg::replace("{--password (.*[^\\\\]\') }", '--=
password \'***\' ', $safeCommand);
+ $this->io->writeError('Executing'.($async ? ' async' : '').' comm=
and ('.($cwd ?: 'CWD').'): '.$safeCommand);
+diff --git a/src/Composer/Util/Url.php b/src/Composer/Util/Url.php
+index d210e7a..28a987f 100644
+--- a/src/Composer/Util/Url.php
++++ b/src/Composer/Util/Url.php
+@@ -20,6 +20,15 @@ use Composer\Pcre\Preg;
+ */
+ class Url
+ {
++ /**
++ * Well-known credential markers used in the user or password slot of=
URLs by various services
++ * (e.g. Bitbucket's x-token-auth or GitLab's gitlab-ci-token). These=
are not secret and are
++ * therefore safe to display verbatim rather than obfuscating them.
++ *
++ * @var list<string>
++ */
++ public const NON_SECRET_CREDENTIALS =3D ['private-token', 'x-token-au=
th', 'oauth2', 'gitlab-ci-token', 'x-oauth-basic'];
++
+ /**
+ * @param non-empty-string $url
+ * @return non-empty-string the updated URL
+@@ -109,18 +118,36 @@ class Url
+ // e.g. https://api.github.com/repositories/9999999999?access_tok=
en=3Dgithub_token
+ $url =3D Preg::replace('{([&?]access_token=3D)[^&]+}', '$1***', $=
url);
+=20
+- $url =3D Preg::replaceCallback('{^(?P<prefix>[a-z0-9]+://)?(?P<us=
er>[^:/\s@]+):(?P<password>[^@\s/]+)@}i', static function ($m): string {
+- // if the username looks like a long (12char+) hex string, or=
a modern github token (e.g. ghp_xxx, github_pat_xxx) we obfuscate that
+- if (Preg::isMatch(GitHub::GITHUB_TOKEN_REGEX, $m['user'])) {
+- return $m['prefix'].'***:***@';
+- }
+- if (strlen($m['user']) >=3D 12) {
+- return $m['prefix'].substr($m['user'], 0, 8).'***:***@';
++ $url =3D Preg::replaceCallback('{^(?P<prefix>[a-z0-9]+://)?(?P<us=
er>[^:/\s@]+)(?::(?P<password>[^@\s/]+))?@}i', static function ($m): string=
{
++ $user =3D self::sanitizeUsername($m['user']);
++ if (($m['password'] ?? '') !=3D=3D '') {
++ return $m['prefix'].$user.':***@';
+ }
+=20
+- return $m['prefix'].$m['user'].':***@';
++ return $m['prefix'].$user.'@';
+ }, $url);
+=20
+ return $url;
+ }
++
++ /**
++ * Returns a display-safe version of the user/token part of a URL's u=
serinfo.
++ *
++ * Modern GitHub tokens (e.g. ghp_xxx, github_pat_xxx) and any other =
long (12char+) value keep
++ * only their first 3 chars (enough to tell which token is in use); s=
hort values (typical
++ * account names) and well-known non-secret markers are returned unch=
anged.
++ */
++ public static function sanitizeUsername(string $user): string
++ {
++ // well-known non-secret credential markers (e.g. Bitbucket's x-t=
oken-auth) are safe to show verbatim
++ if (in_array($user, self::NON_SECRET_CREDENTIALS, true)) {
++ return $user;
++ }
++ // GitHub tokens and any other long (12char+) value keep only the=
ir first 3 chars
++ if (Preg::isMatch(GitHub::GITHUB_TOKEN_REGEX, $user) || strlen($u=
ser) >=3D 12) {
++ return substr($user, 0, 3).'***';
++ }
++
++ return $user;
++ }
+ }
+diff --git a/tests/Composer/Test/Util/AuthHelperTest.php b/tests/Composer/=
Test/Util/AuthHelperTest.php
+index 2d5a75c..e8f03c9 100644
+--- a/tests/Composer/Test/Util/AuthHelperTest.php
++++ b/tests/Composer/Test/Util/AuthHelperTest.php
+@@ -322,6 +322,49 @@ class AuthHelperTest extends TestCase
+ );
+ }
+=20
++ public function testAddAuthenticationHeaderWithBasicHttpAuthenticatio=
nMasksTokenUsername(): void
++ {
++ $origin =3D 'some-api.url.com';
++ $url =3D 'https://some-api.url.com';
++ $auth =3D array(
++ 'username' =3D> 'ghp_1234567890abcdefghijklmnopqrstuvwxyzAB',
++ 'password' =3D> 'x-oauth-basic',
++ );
++
++ $headers =3D array(
++ 'Accept-Encoding: gzip',
++ 'Connection: close',
++ );
++
++ $this->expectsAuthentication($origin, $auth);
++
++ $this->config->expects($this->once())
++ ->method('get')
++ ->with('gitlab-domains')
++ ->willReturn(array($origin));
++
++ // the displayed username must be obfuscated so a token in the us=
er slot does not leak to verbose logs
++ // (only the first 3 chars are kept, enough to tell which kind of=
token is in use)
++ $this->io->expects($this->once())
++ ->method('writeError')
++ ->with(
++ 'Using HTTP basic authentication with username "ghp***"',
++ true,
++ IOInterface::DEBUG
++ );
++
++ // the actual auth header must still contain the real, un-obfusca=
ted credentials
++ $expectedHeaders =3D array_merge(
++ $headers,
++ array('Authorization: Basic ' . base64_encode($auth['username=
'] . ':' . $auth['password']))
++ );
++
++ $this->assertSame(
++ $expectedHeaders,
++ $this->authHelper->addAuthenticationHeader($headers, $origin,=
$url)
++ );
++ }
++
+ #[DataProvider('bitbucketPublicUrlProvider')]
+ public function testIsPublicBitBucketDownloadWithBitbucketPublicUrl(s=
tring $url): void
+ {
+diff --git a/tests/Composer/Test/Util/ProcessExecutorTest.php b/tests/Comp=
oser/Test/Util/ProcessExecutorTest.php
+index da27847..2d94e06 100644
+--- a/tests/Composer/Test/Util/ProcessExecutorTest.php
++++ b/tests/Composer/Test/Util/ProcessExecutorTest.php
+@@ -81,8 +81,10 @@ class ProcessExecutorTest extends TestCase
+ return [
+ ['echo https://foo:bar@example.org/', 'echo https://foo:***@e=
xample.org/'],
+ ['echo http://foo@example.org', 'echo http://foo@example.org'=
],
+- ['echo http://abcdef1234567890234578:x-oauth-token@github.com=
/', 'echo http://***:***@github.com/'],
+- ['echo http://github_pat_1234567890abcdefghijkl_1234567890abc=
defghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW:x-oauth-token@github.com/', =
'echo http://***:***@github.com/'],
++ ['echo http://abcdef1234567890234578:x-oauth-token@github.com=
/', 'echo http://abc***:***@github.com/'],
++ ['echo http://github_pat_1234567890abcdefghijkl_1234567890abc=
defghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW:x-oauth-token@github.com/', =
'echo http://git***:***@github.com/'],
++ ['echo http://ghp_1234567890abcdefghijklmnopqrstuvwxyzAB@gith=
ub.com/', 'echo http://ghp***@github.com/'],
++ ['echo http://abcdef1234567890234578@github.com/', 'echo http=
://abc***@github.com/'],
+ ["svn ls --verbose --non-interactive --username 'foo' --pass=
word 'bar' 'https://foo.example.org/svn/'", "svn ls --verbose --non-intera=
ctive --username 'foo' --password '***' 'https://foo.example.org/svn/'"],
+ ["svn ls --verbose --non-interactive --username 'foo' --pass=
word 'bar \'bar' 'https://foo.example.org/svn/'", "svn ls --verbose --non-=
interactive --username 'foo' --password '***' 'https://foo.example.org/sv=
n/'"],
+ ];
+diff --git a/tests/Composer/Test/Util/UrlTest.php b/tests/Composer/Test/Ut=
il/UrlTest.php
+index fb54143..4f16104 100644
+--- a/tests/Composer/Test/Util/UrlTest.php
++++ b/tests/Composer/Test/Util/UrlTest.php
+@@ -75,24 +75,35 @@ class UrlTest extends TestCase
+ ['https://foo:***@example.org/', 'https://foo:bar@example.org=
/'],
+ ['https://foo@example.org/', 'https://foo@example.org/'],
+ ['https://example.org/', 'https://example.org/'],
+- ['http://***:***@example.org', 'http://10a8f08e8d7b7b9:foo@ex=
ample.org'],
++ ['http://10a***:***@example.org', 'http://10a8f08e8d7b7b9:foo=
@example.org'],
+ ['https://foo:***@example.org:123/', 'https://foo:bar@example=
=2Eorg:123/'],
+ ['https://example.org/foo/bar?access_token=3D***', 'https://e=
xample.org/foo/bar?access_token=3Dabcdef'],
+ ['https://example.org/foo/bar?foo=3Dbar&access_token=3D***', =
'https://example.org/foo/bar?foo=3Dbar&access_token=3Dabcdef'],
+- ['https://***:***@github.com/acme/repo', 'https://ghp_1234567=
890abcdefghijklmnopqrstuvwxyzAB:x-oauth-basic@github.com/acme/repo'],
+- ['https://***:***@github.com/acme/repo', 'https://github_pat_=
1234567890abcdefghijkl_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP=
QRSTUVW:x-oauth-basic@github.com/acme/repo'],
+- ['http://abcdefgh***:***@example.org:123/', 'http://abcdefghi=
jkl:bar@example.org:123/'],
+- ['https://abcdefgh***:***@example.org:123/', 'https://abcdefg=
hijklmnop:bar@example.org:123/'],
++ ['https://ghp***:***@github.com/acme/repo', 'https://ghp_1234=
567890abcdefghijklmnopqrstuvwxyzAB:x-oauth-basic@github.com/acme/repo'],
++ ['https://git***:***@github.com/acme/repo', 'https://github_p=
at_1234567890abcdefghijkl_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM=
NOPQRSTUVW:x-oauth-basic@github.com/acme/repo'],
++ ['http://abc***:***@example.org:123/', 'http://abcdefghijkl:b=
ar@example.org:123/'],
++ ['https://abc***:***@example.org:123/', 'https://abcdefghijkl=
mnop:bar@example.org:123/'],
++ // token/long username in the user slot without a password (e=
=2Eg. https://TOKEN@host)
++ ['https://ghp***@github.com/acme/repo', 'https://ghp_12345678=
90abcdefghijklmnopqrstuvwxyzAB@github.com/acme/repo'],
++ ['https://git***@github.com/acme/repo', 'https://github_pat_1=
234567890abcdefghijkl_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQ=
RSTUVW@github.com/acme/repo'],
++ ['http://10a***@example.org', 'http://10a8f08e8d7b7b9@example=
=2Eorg'],
++ ['https://abc***@example.org:123/', 'https://abcdefghijklmnop=
@example.org:123/'],
++ // well-known non-secret credential markers are shown verbati=
m even though they are 12char+
++ ['https://x-token-auth:***@bitbucket.org/acme/repo', 'https:/=
/x-token-auth:secret@bitbucket.org/acme/repo'],
++ ['https://gitlab-ci-token:***@gitlab.example.org/', 'https://=
gitlab-ci-token:realtoken@gitlab.example.org/'],
+ // without scheme
+ ['foo:***@example.org/', 'foo:bar@example.org/'],
+ ['foo@example.org/', 'foo@example.org/'],
+ ['example.org/', 'example.org/'],
+- ['***:***@example.org', '10a8f08e8d7b7b9:foo@example.org'],
++ ['10a***:***@example.org', '10a8f08e8d7b7b9:foo@example.org'],
+ ['foo:***@example.org:123/', 'foo:bar@example.org:123/'],
+ ['example.org/foo/bar?access_token=3D***', 'example.org/foo/b=
ar?access_token=3Dabcdef'],
+ ['example.org/foo/bar?foo=3Dbar&access_token=3D***', 'example=
=2Eorg/foo/bar?foo=3Dbar&access_token=3Dabcdef'],
+- ['abcdefgh***:***@example.org:123/', 'abcdefghijkl:bar@exampl=
e.org:123/'],
+- ['abcdefgh***:***@example.org:123/', 'abcdefghijklmnop:bar@ex=
ample.org:123/'],
++ ['abc***:***@example.org:123/', 'abcdefghijkl:bar@example.org=
:123/'],
++ ['abc***:***@example.org:123/', 'abcdefghijklmnop:bar@example=
=2Eorg:123/'],
++ ['ghp***@github.com/acme/repo', 'ghp_1234567890abcdefghijklmn=
opqrstuvwxyzAB@github.com/acme/repo'],
++ ['10a***@example.org', '10a8f08e8d7b7b9@example.org'],
++ ['abc***@example.org:123/', 'abcdefghijklmnop@example.org:123=
/'],
+ ];
+ }
+ }
diff -Nru composer-2.8.8/debian/patches/0025-Merge-commit-from-fork.patch c=
omposer-2.8.8/debian/patches/0025-Merge-commit-from-fork.patch
--- composer-2.8.8/debian/patches/0025-Merge-commit-from-fork.patch 1970-01=
-01 01:00:00.000000000 +0100
+++ composer-2.8.8/debian/patches/0025-Merge-commit-from-fork.patch 2026-08=
-29 13:39:42.000000000 +0200
@@ -0,0 +1,234 @@
+From: Jordi Boggiano <j.boggiano@seld.be>
+Date: Thu, 27 Aug 2026 13:07:20 +0200
+Subject: Merge commit from fork
+
+* Prevent bin symlinks from escaping the package directory (GHSA-96h3-5x6v=
-m776)
+
+The GHSA-gjfg-22fp-rrxx fix rejects literal ".." components in bin metadat=
a,
+but that only inspects the metadata string. A malicious package can declar=
e a
+clean bin (e.g. bin/pwn) while shipping bin/pwn as a symlink to
+../../../../victim.sh. BinaryInstaller would follow the symlink and chmod /
+proxy a file outside the package install directory.
+
+Verify realpath($binPath) stays within realpath($installPath) before using=
the
+bin, skipping it with a warning otherwise. Legitimate in-package symlinks =
and
+path-repository symlink installs still resolve inside the package and are
+unaffected.
+
+* Also guard the FileDownloader bin chmod against escaping paths (GHSA-96h=
3-5x6v-m776)
+
+FileDownloader::install() chmods the package's bins itself, for single-fil=
e dists
+which cannot carry a mode. That loop never went through
+ValidatingArrayLoader::validatePackage(), and composer reinstall builds its
+operations straight from installed.json without ever solving, so a ".." bi=
n there
+still reached the chmod even with the BinaryInstaller check in place.
+
+Extract the containment check into BinaryInstaller::isBinPathInsidePackage=
() and
+use it in both sinks.
+
+Origin: backport, https://github.com/composer/composer/commit/53b8bb4c2469=
7b2f00a18cf1ef35a10392701b89
+Bug: https://github.com/composer/composer/security/advisories/GHSA-96h3-5x=
6v-m776
+Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2026-59944
+---
+ src/Composer/Downloader/FileDownloader.php | 12 ++++-
+ src/Composer/Installer/BinaryInstaller.php | 27 ++++++++++
+ .../Test/Downloader/FileDownloaderTest.php | 39 ++++++++++++++
+ .../Test/Installer/BinaryInstallerTest.php | 59 +++++++++++++++++=
+++++
+ 4 files changed, 135 insertions(+), 2 deletions(-)
+
+diff --git a/src/Composer/Downloader/FileDownloader.php b/src/Composer/Dow=
nloader/FileDownloader.php
+index 5f3b242..bd3b018 100644
+--- a/src/Composer/Downloader/FileDownloader.php
++++ b/src/Composer/Downloader/FileDownloader.php
+@@ -26,6 +26,7 @@ use Composer\Plugin\PluginEvents;
+ use Composer\Plugin\PostFileDownloadEvent;
+ use Composer\Plugin\PreFileDownloadEvent;
+ use Composer\EventDispatcher\EventDispatcher;
++use Composer\Installer\BinaryInstaller;
+ use Composer\Util\Filesystem;
+ use Composer\Util\Http\Response;
+ use Composer\Util\Platform;
+@@ -364,9 +365,16 @@ class FileDownloader implements DownloaderInterface, =
ChangeReportInterface
+ // Single files can not have a mode set like files in archives
+ // so we make sure if the file is a binary that it is executable
+ foreach ($package->getBinaries() as $bin) {
+- if (file_exists($path . '/' . $bin) && !is_executable($path .=
'/' . $bin)) {
+- Silencer::call('chmod', $path . '/' . $bin, 0777 & ~umask=
());
++ $binPath =3D $path . '/' . $bin;
++ if (!file_exists($binPath) || is_executable($binPath)) {
++ continue;
+ }
++ // a bin resolving outside of the package would let it chmod =
an arbitrary host file, this
++ // is reported by BinaryInstaller later in the same install (=
GHSA-96h3-5x6v-m776)
++ if (!BinaryInstaller::isBinPathInsidePackage($path, $binPath)=
) {
++ continue;
++ }
++ Silencer::call('chmod', $binPath, 0777 & ~umask());
+ }
+=20
+ return \React\Promise\resolve(null);
+diff --git a/src/Composer/Installer/BinaryInstaller.php b/src/Composer/Ins=
taller/BinaryInstaller.php
+index 9211325..4c3cb46 100644
+--- a/src/Composer/Installer/BinaryInstaller.php
++++ b/src/Composer/Installer/BinaryInstaller.php
+@@ -71,6 +71,13 @@ class BinaryInstaller
+ $this->io->writeError(' <warning>Skipped installation =
of bin '.$bin.' for package '.$package->getName().': found a directory at t=
hat path</warning>');
+ continue;
+ }
++ // A malicious package can pass the ".." bin metadata check y=
et ship the bin as a symlink
++ // pointing outside the package (e.g. to ../../../victim.sh),=
following it here would let
++ // the package chmod/proxy an arbitrary host file (GHSA-96h3-=
5x6v-m776).
++ if (!self::isBinPathInsidePackage($installPath, $binPath)) {
++ $this->io->writeError(' <warning>Skipped installation =
of bin '.$bin.' for package '.$package->getName().': the bin resolves to a =
path outside of the package directory</warning>');
++ continue;
++ }
+ if (!$this->filesystem->isAbsolutePath($binPath)) {
+ // in case a custom installer returned a relative path fo=
r the
+ // $package, we can now safely turn it into a absolute pa=
th (as we
+@@ -147,6 +154,26 @@ class BinaryInstaller
+ return 'php';
+ }
+=20
++ /**
++ * Checks that a bin file resolves to a path inside the package's own=
install directory
++ *
++ * A bin escaping the package, either via ".." metadata or by being a=
symlink pointing out of it,
++ * would let the package chmod/proxy an arbitrary host file, see GHSA=
-gjfg-22fp-rrxx and
++ * GHSA-96h3-5x6v-m776.
++ */
++ public static function isBinPathInsidePackage(string $installPath, st=
ring $binPath): bool
++ {
++ $realBinPath =3D realpath($binPath);
++ $realInstallPath =3D realpath($installPath);
++
++ // fail closed if either path cannot be resolved
++ if (false =3D=3D=3D $realBinPath || false =3D=3D=3D $realInstallP=
ath) {
++ return false;
++ }
++
++ return strpos($realBinPath, $realInstallPath.DIRECTORY_SEPARATOR)=
=3D=3D=3D 0;
++ }
++
+ /**
+ * @return string[]
+ */
+diff --git a/tests/Composer/Test/Downloader/FileDownloaderTest.php b/tests=
/Composer/Test/Downloader/FileDownloaderTest.php
+index 560406d..cc44b1a 100644
+--- a/tests/Composer/Test/Downloader/FileDownloaderTest.php
++++ b/tests/Composer/Test/Downloader/FileDownloaderTest.php
+@@ -86,6 +86,45 @@ class FileDownloaderTest extends TestCase
+ }
+ }
+=20
++ public function testInstallDoesNotChmodBinOutsideOfPackage(): void
++ {
++ $rootDir =3D self::getUniqueTmpDirectory();
++ $vendorDir =3D $rootDir.'/vendor';
++ $path =3D $vendorDir.'/attacker/pkg';
++
++ $package =3D self::getPackage();
++ $package->setDistUrl('http://example.com/script.js');
++ // a ".." bin which never went through ValidatingArrayLoader::val=
idatePackage(), as is the
++ // case for composer reinstall which builds its operations straig=
ht from installed.json
++ $package->setBinaries(['../../../victim.sh']);
++
++ $victim =3D $rootDir.'/victim.sh';
++ file_put_contents($victim, "#!/bin/sh\necho pwned\n");
++ chmod($victim, 0600);
++ clearstatcache();
++ $modeBefore =3D fileperms($victim);
++
++ $downloader =3D $this->getDownloader(null, $this->getConfig(['ven=
dor-dir' =3D> $vendorDir]));
++
++ // seed the downloaded file where install() expects to find it
++ $method =3D new \ReflectionMethod($downloader, 'getFileName');
++ (\PHP_VERSION_ID < 80100) and $method->setAccessible(true);
++ $tmpFile =3D $method->invoke($downloader, $package, $path);
++ $fs =3D new Filesystem();
++ $fs->ensureDirectoryExists(dirname($tmpFile));
++ file_put_contents($tmpFile, 'downloaded');
++
++ try {
++ $downloader->install($package, $path, false);
++
++ self::assertFileExists($path.'/script.js');
++ clearstatcache();
++ self::assertSame($modeBefore, fileperms($victim), 'A bin esca=
ping the package dir must not be chmod\'d');
++ } finally {
++ $fs->removeDirectory($rootDir);
++ }
++ }
++
+ public function testGetFileName(): void
+ {
+ $package =3D self::getPackage();
+diff --git a/tests/Composer/Test/Installer/BinaryInstallerTest.php b/tests=
/Composer/Test/Installer/BinaryInstallerTest.php
+index 981eb5f..b2bcbdb 100644
+--- a/tests/Composer/Test/Installer/BinaryInstallerTest.php
++++ b/tests/Composer/Test/Installer/BinaryInstallerTest.php
+@@ -85,6 +85,65 @@ class BinaryInstallerTest extends TestCase
+ self::assertEquals('success arg', $output);
+ }
+=20
++ /**
++ * @requires function symlink
++ */
++ public function testInstallBinaryRejectsSymlinkEscapingPackageDir(): =
void
++ {
++ $package =3D $this->createPackageMock();
++ $package->expects($this->any())
++ ->method('getBinaries')
++ ->willReturn(['bin/pwn']);
++
++ // A file outside the package install directory that must not be =
touched.
++ $victim =3D $this->rootDir.'/victim.sh';
++ file_put_contents($victim, "#!/bin/sh\necho pwned\n");
++ chmod($victim, 0644);
++ clearstatcache();
++ $modeBefore =3D fileperms($victim);
++
++ $installPath =3D $this->vendorDir.'/attacker/pkg';
++ $this->ensureDirectoryExistsAndClear($installPath.'/bin');
++ // bin/pwn is a symlink escaping the package to the victim file (=
GHSA-96h3-5x6v-m776).
++ if (!@symlink('../../../../victim.sh', $installPath.'/bin/pwn')) {
++ $this->markTestSkipped('Symbolic links are not supported on t=
his platform');
++ }
++
++ $installer =3D new BinaryInstaller($this->io, $this->binDir, 'ful=
l', $this->fs);
++ $installer->installBinaries($package, $installPath);
++
++ self::assertFileDoesNotExist($this->binDir.'/pwn', 'No vendor/bin=
proxy must be created for an escaping symlink bin');
++ clearstatcache();
++ self::assertSame($modeBefore, fileperms($victim), 'A bin symlink =
escaping the package dir must not be chmod\'d');
++ }
++
++ public function testInstallBinaryRejectsTraversingBinPath(): void
++ {
++ // ".." bin metadata can reach BinaryInstaller without passing th=
rough the solver-time
++ // ValidatingArrayLoader::validatePackage() check, e.g. via the e=
nsureBinariesPresence()
++ // re-generation loop which reads packages straight from installe=
d.json.
++ $package =3D $this->createPackageMock();
++ $package->expects($this->any())
++ ->method('getBinaries')
++ ->willReturn(['../../../victim.sh']);
++
++ $victim =3D $this->rootDir.'/victim.sh';
++ file_put_contents($victim, "#!/bin/sh\necho pwned\n");
++ chmod($victim, 0600);
++ clearstatcache();
++ $modeBefore =3D fileperms($victim);
++
++ $installPath =3D $this->vendorDir.'/attacker/pkg';
++ $this->ensureDirectoryExistsAndClear($installPath);
++
++ $installer =3D new BinaryInstaller($this->io, $this->binDir, 'ful=
l', $this->fs);
++ $installer->installBinaries($package, $installPath);
++
++ self::assertFileDoesNotExist($this->binDir.'/victim.sh', 'No vend=
or/bin proxy must be created for a traversing bin');
++ clearstatcache();
++ self::assertSame($modeBefore, fileperms($victim), 'A bin escaping=
the package dir via ".." must not be chmod\'d');
++ }
++
+ public static function executableBinaryProvider(): array
+ {
+ return [
diff -Nru composer-2.8.8/debian/patches/0026-Merge-commit-from-fork.patch c=
omposer-2.8.8/debian/patches/0026-Merge-commit-from-fork.patch
--- composer-2.8.8/debian/patches/0026-Merge-commit-from-fork.patch 1970-01=
-01 01:00:00.000000000 +0100
+++ composer-2.8.8/debian/patches/0026-Merge-commit-from-fork.patch 2026-08=
-29 13:39:42.000000000 +0200
@@ -0,0 +1,310 @@
+From: Jordi Boggiano <j.boggiano@seld.be>
+Date: Thu, 27 Aug 2026 13:08:25 +0200
+Subject: Merge commit from fork
+
+A package's source.url is handed to the p4 client as P4PORT. The client
+documents `rsh:<cmd>`/`jsh:<cmd>` endpoints as "start <cmd> locally and sp=
eak
+the protocol over its stdio", so a repository operator could publish a pac=
kage
+with source.type=3Dperforce and source.url=3Drsh:... and get arbitrary com=
mand
+execution as soon as the victim installed it from source. Argv escaping do=
es
+not help here: the execution is a semantic of the p4 client, not of the sh=
ell.
+
+Add Perforce::isValidPort(), which accepts only the documented network for=
ms
+([tcp|ssl:][host:]port) and rejects the rsh:/jsh: transports outright, and
+enforce it at three points:
+
+- Perforce::__construct() throws, covering both PerforceDownloader (the at=
tack
+ path) and PerforceDriver.
+- Perforce::checkServerExists() returns false rather than throwing, as it =
is a
+ detection probe run against every VCS repository url when no driver matc=
hed.
+- ValidatingArrayLoader, in load() so `composer validate` and packagist re=
ject
+ such a package at publish time, and in validatePackage() so a package co=
ming
+ from a repository or a crafted lock file fails before any p4 call.
+
+testGenerateP4CommandEscapesPortInjection is replaced by an assertion that=
the
+constructor now rejects that port outright.
+
+Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
+
+Origin: backport, https://github.com/composer/composer/commit/0aac50528e83=
ed635cf788333635897469440220
+Bug: https://github.com/composer/composer/security/advisories/GHSA-rvx4-ff=
vw-m9q3
+---
+ .../Package/Loader/ValidatingArrayLoader.php | 17 +++++
+ src/Composer/Util/Perforce.php | 29 ++++++++
+ .../Package/Loader/ValidatingArrayLoaderTest.php | 25 ++++++-
+ tests/Composer/Test/Util/PerforceTest.php | 84 +++++++++++++++++=
+++--
+ 4 files changed, 149 insertions(+), 6 deletions(-)
+
+diff --git a/src/Composer/Package/Loader/ValidatingArrayLoader.php b/src/C=
omposer/Package/Loader/ValidatingArrayLoader.php
+index 7830fd6..5076a9f 100644
+--- a/src/Composer/Package/Loader/ValidatingArrayLoader.php
++++ b/src/Composer/Package/Loader/ValidatingArrayLoader.php
+@@ -23,6 +23,7 @@ use Composer\Repository\PlatformRepository;
+ use Composer\Semver\Constraint\MatchNoneConstraint;
+ use Composer\Semver\Intervals;
+ use Composer\Spdx\SpdxLicenses;
++use Composer\Util\Perforce;
+=20
+ /**
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+@@ -418,6 +419,14 @@ class ValidatingArrayLoader implements LoaderInterface
+ if (isset($this->config[$srcType]['url']) && Preg::isMatc=
h('{^\s*-}', (string) $this->config[$srcType]['url'])) {
+ $this->errors[] =3D $srcType . '.url : must not start=
with a "-", "'.$this->config[$srcType]['url'].'" given';
+ }
++ // a perforce url is passed to the p4 client as P4PORT, w=
here rsh:/jsh: endpoints
++ // mean "run this command locally" (GHSA-rvx4-ffvw-m9q3)
++ if ($srcType =3D=3D=3D 'source' && ($this->config[$srcTyp=
e]['type'] ?? null) =3D=3D=3D 'perforce'
++ && isset($this->config[$srcType]['url']) && is_string=
($this->config[$srcType]['url'])
++ && !Perforce::isValidPort($this->config[$srcType]['ur=
l'])
++ ) {
++ $this->errors[] =3D $srcType . '.url : invalid Perfor=
ce port ("'.$this->config[$srcType]['url'].'"), it must be of the form [tcp=
|ssl:][host:]port';
++ }
+ }
+ }
+=20
+@@ -567,6 +576,14 @@ class ValidatingArrayLoader implements LoaderInterface
+ }
+ }
+=20
++ // A perforce source.url ends up as the p4 client's P4PORT, and a=
"rsh:"/"jsh:" endpoint
++ // there makes the client execute the rest of the value as a loca=
l command instead of
++ // connecting to a server (GHSA-rvx4-ffvw-m9q3), so only accept n=
etwork endpoints.
++ $sourceUrl =3D $package->getSourceUrl();
++ if ($package->getSourceType() =3D=3D=3D 'perforce' && $sourceUrl =
!=3D=3D null && !Perforce::isValidPort($sourceUrl)) {
++ throw new SecurityException($package->getName().' has an inva=
lid source.url, it must be a Perforce port of the form [tcp|ssl:][host:]por=
t: '.$sourceUrl);
++ }
++
+ // Bin paths are resolved relative to the package install dir and=
then chmod'd (and
+ // proxied) by BinaryInstaller. A ".." segment escapes that direc=
tory and lets a
+ // dependency chmod/point at an arbitrary host file (GHSA-gjfg-22=
fp-rrxx), so reject it.
+diff --git a/src/Composer/Util/Perforce.php b/src/Composer/Util/Perforce.p=
hp
+index 331daf3..aede9d6 100644
+--- a/src/Composer/Util/Perforce.php
++++ b/src/Composer/Util/Perforce.php
+@@ -12,6 +12,7 @@
+=20
+ namespace Composer\Util;
+=20
++use Composer\Exception\SecurityException;
+ use Composer\IO\IOInterface;
+ use Composer\Pcre\Preg;
+ use Symfony\Component\Process\ExecutableFinder;
+@@ -64,6 +65,10 @@ class Perforce
+ */
+ public function __construct($repoConfig, string $port, string $path, =
ProcessExecutor $process, bool $isWindows, IOInterface $io)
+ {
++ if (!self::isValidPort($port)) {
++ throw new SecurityException('Invalid Perforce port ('.$port.'=
), it must be of the form [tcp|ssl:][host:]port');
++ }
++
+ $this->windowsFlag =3D $isWindows;
+ $this->p4Port =3D $port;
+ $this->initializePath($path);
+@@ -82,9 +87,33 @@ class Perforce
+=20
+ public static function checkServerExists(string $url, ProcessExecutor=
$processExecutor): bool
+ {
++ // this is a detection probe which runs against every VCS reposit=
ory url when no driver
++ // matched yet, so an unusable port is simply "not a perforce ser=
ver" and not an error
++ if (!self::isValidPort($url)) {
++ return false;
++ }
++
+ return 0 =3D=3D=3D $processExecutor->execute(['p4', '-p', $url, '=
info', '-s'], $ignoredOutput);
+ }
+=20
++ /**
++ * Checks that a P4PORT value is a network endpoint the p4 client can=
connect to.
++ *
++ * A `rsh:`/`jsh:` P4PORT makes the p4 client run the rest of the val=
ue as a local child process
++ * instead of connecting to a server, so a package-controlled source.=
url must never reach it
++ * (GHSA-rvx4-ffvw-m9q3). Only the documented `[transport:][host:]por=
t` forms are accepted.
++ */
++ public static function isValidPort(string $url): bool
++ {
++ // rsh/jsh are transport keywords to p4, so "rsh:foo" never parse=
s as host "rsh" port "foo"
++ // and has to be rejected before the shape check below would happ=
ily accept it
++ if (Preg::isMatch('{^\s*+(?:rsh|jsh)\s*+:}i', $url)) {
++ return false;
++ }
++
++ return Preg::isMatch('{^(?:(?:tcp|ssl)(?:4|6|46|64)?:)?(?:\[[0-9a=
-f:.]++\]|[a-z0-9._][a-z0-9._-]*+)(?::[a-z0-9._][a-z0-9._-]*+)?$}iD', $url);
++ }
++
+ /**
+ * @phpstan-param RepoConfig $repoConfig
+ */
+diff --git a/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.=
php b/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
+index d1a9215..995ad89 100644
+--- a/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
++++ b/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
+@@ -444,7 +444,18 @@ class ValidatingArrayLoaderTest extends TestCase
+ 'require' =3D> ['acme/bar' =3D> '^1.0']
+ ],
+ ['name : must be present'],
+- ]
++ ],
++ [
++ [
++ 'name' =3D> 'foo/bar',
++ 'source' =3D> [
++ 'type' =3D> 'perforce',
++ 'url' =3D> 'rsh:touch /tmp/pwned',
++ 'reference' =3D> '//depot/main',
++ ],
++ ],
++ ['source.url : invalid Perforce port ("rsh:touch /tmp/pwn=
ed"), it must be of the form [tcp|ssl:][host:]port'],
++ ],
+ ]);
+ }
+=20
+@@ -609,6 +620,12 @@ class ValidatingArrayLoaderTest extends TestCase
+ $package->setBinaries(['bin/foo', 'console', 'some.bin']);
+ ValidatingArrayLoader::validatePackage($package);
+=20
++ $perforcePackage =3D self::getPackage('vendor/perforce', '1.0.0');
++ $perforcePackage->setSourceType('perforce');
++ $perforcePackage->setSourceUrl('ssl:p4.example.org:1666');
++ $perforcePackage->setSourceReference('//depot/main');
++ ValidatingArrayLoader::validatePackage($perforcePackage);
++
+ // platform packages are accepted as-is, and the root package is =
skipped entirely
+ ValidatingArrayLoader::validatePackage(self::getPackage('php', '8=
=2E2.0'));
+ ValidatingArrayLoader::validatePackage(self::getRootPackage());
+@@ -655,6 +672,11 @@ class ValidatingArrayLoaderTest extends TestCase
+ $badBin =3D self::getPackage('vendor/pkg', '1.0.0');
+ $badBin->setBinaries(['bin/ok', '../../../../escape-target.txt']);
+=20
++ $badPerforceUrl =3D self::getPackage('vendor/pkg', '1.0.0');
++ $badPerforceUrl->setSourceType('perforce');
++ $badPerforceUrl->setSourceUrl('rsh:touch /tmp/pwned');
++ $badPerforceUrl->setSourceReference('//depot/main');
++
+ return [
+ 'invalid name' =3D> [$badName, 'Invalid package found during =
dependency resolution'],
+ 'dash source.url' =3D> [$badSourceUrl, 'vendor/pkg has an inv=
alid source.url'],
+@@ -662,6 +684,7 @@ class ValidatingArrayLoaderTest extends TestCase
+ 'dash dist.url' =3D> [$badDistUrl, 'vendor/pkg has an invalid=
dist.url'],
+ 'dash dist.reference' =3D> [$badDistReference, 'vendor/pkg ha=
s an invalid dist.reference'],
+ 'bin path traversal' =3D> [$badBin, 'vendor/pkg has an invali=
d bin ../../../../escape-target.txt, it must not contain ".." path segments=
'],
++ 'perforce rsh source.url' =3D> [$badPerforceUrl, 'vendor/pkg =
has an invalid source.url, it must be a Perforce port of the form [tcp|ssl:=
][host:]port: rsh:touch /tmp/pwned'],
+ ];
+ }
+ }
+diff --git a/tests/Composer/Test/Util/PerforceTest.php b/tests/Composer/Te=
st/Util/PerforceTest.php
+index 752079c..8978ce0 100644
+--- a/tests/Composer/Test/Util/PerforceTest.php
++++ b/tests/Composer/Test/Util/PerforceTest.php
+@@ -12,6 +12,7 @@
+=20
+ namespace Composer\Test\Util;
+=20
++use Composer\Exception\SecurityException;
+ use Composer\Json\JsonFile;
+ use Composer\Test\Mock\ProcessExecutorMock;
+ use Composer\Util\Perforce;
+@@ -132,9 +133,11 @@ class PerforceTest extends TestCase
+ self::assertEquals($expected, $p4Command);
+ }
+=20
+- public function testGenerateP4CommandEscapesPortInjection(): void
++ public function testCreatingPerforceRejectsPortWithShellMetacharacter=
s(): void
+ {
+- $perforce =3D new Perforce(
++ $this->expectException('Composer\Exception\SecurityException', 'I=
nvalid Perforce port (localhost:1666; touch /tmp/pwned)');
++
++ new Perforce(
+ ['depot' =3D> 'depot', 'branch' =3D> 'branch', 'p4user' =3D> =
'user', 'unique_perforce_client_name' =3D> 'TEST'],
+ 'localhost:1666; touch /tmp/pwned',
+ 'path',
+@@ -142,9 +145,6 @@ class PerforceTest extends TestCase
+ false,
+ $this->io
+ );
+- $command =3D $perforce->generateP4Command('login -s', false);
+- self::assertStringNotContainsString('-p localhost:1666; touch /tm=
p/pwned', $command);
+- self::assertStringContainsString('-p '.ProcessExecutor::escape('l=
ocalhost:1666; touch /tmp/pwned'), $command);
+ }
+=20
+ public function testGenerateP4CommandEscapesUserInjection(): void
+@@ -617,6 +617,80 @@ class PerforceTest extends TestCase
+ self::assertTrue($result);
+ }
+=20
++ public function testCheckServerExistsRejectsCommandExecutingPort(): v=
oid
++ {
++ // no process must be started at all for a rsh:/jsh: endpoint, as=
the p4 client would
++ // execute it instead of connecting to a server
++ $this->processExecutor->expects([], true);
++
++ self::assertFalse(Perforce::checkServerExists('rsh:touch /tmp/pwn=
ed', $this->processExecutor));
++ }
++
++ /**
++ * @dataProvider provideValidPorts
++ */
++ public function testIsValidPortAcceptsNetworkEndpoints(string $port):=
void
++ {
++ self::assertTrue(Perforce::isValidPort($port));
++ }
++
++ /**
++ * @return array<array{string}>
++ */
++ public static function provideValidPorts(): array
++ {
++ return [
++ ['1666'],
++ ['perforce'],
++ ['p4.example.org:1666'],
++ ['perforce.does.exist:port'],
++ ['tcp:p4.example.org:1666'],
++ ['tcp4:p4.example.org:1666'],
++ ['ssl:p4.example.org:1666'],
++ ['SSL:p4.example.org:1666'],
++ ['ssl64:[2001:db8::1]:1666'],
++ ['tcp6:[::1]:1666'],
++ ];
++ }
++
++ /**
++ * @dataProvider provideInvalidPorts
++ */
++ public function testIsValidPortRejectsNonNetworkEndpoints(string $por=
t): void
++ {
++ self::assertFalse(Perforce::isValidPort($port));
++ }
++
++ /**
++ * @return array<array{string}>
++ */
++ public static function provideInvalidPorts(): array
++ {
++ return [
++ // rsh:/jsh: make the p4 client run the rest of the value as =
a local command
++ ['rsh:/tmp/evil.sh'],
++ ['rsh:evil'],
++ ['RSH:evil'],
++ [' rsh:evil'],
++ ['jsh:evil'],
++ ['JsH:evil'],
++ ['rsh :evil'],
++ // not valid endpoints either way
++ ['tcp:p4.example.org:1666; touch /tmp/pwned'],
++ ['https://example.org/vendor/pkg.git'],
++ ['-p1666'],
++ [''],
++ ];
++ }
++
++ public function testCreatingPerforceWithCommandExecutingPortThrows():=
void
++ {
++ self::expectException(SecurityException::class);
++ self::expectExceptionMessage('Invalid Perforce port (rsh:touch /t=
mp/pwned)');
++
++ new Perforce($this->repoConfig, 'rsh:touch /tmp/pwned', self::TES=
T_PATH, $this->processExecutor, false, $this->io);
++ }
++
+ /**
+ * Test if "p4" command is missing.
+ *
diff -Nru composer-2.8.8/debian/patches/0027-Modernize-PHPUnit-syntax.patch=
composer-2.8.8/debian/patches/0027-Modernize-PHPUnit-syntax.patch
--- composer-2.8.8/debian/patches/0027-Modernize-PHPUnit-syntax.patch 1970-=
01-01 01:00:00.000000000 +0100
+++ composer-2.8.8/debian/patches/0027-Modernize-PHPUnit-syntax.patch 2026-=
08-29 13:39:42.000000000 +0200
@@ -0,0 +1,103 @@
+From: =3D?utf-8?q?David_Pr=3DC3=3DA9vot?=3D <taffit@debian.org>
+Date: Fri, 29 Aug 2025 08:31:05 +0200
+Subject: Modernize PHPUnit syntax
+
+---
+ tests/Composer/Test/IO/BaseIOTest.php | 5 ++---
+ tests/Composer/Test/IO/ConsoleIOTest.php | 3 ++-
+ tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php | 4 +---
+ tests/Composer/Test/Util/PerforceTest.php | 9 +++-=
-----
+ 4 files changed, 8 insertions(+), 13 deletions(-)
+
+diff --git a/tests/Composer/Test/IO/BaseIOTest.php b/tests/Composer/Test/I=
O/BaseIOTest.php
+index 7219837..050cfd1 100644
+--- a/tests/Composer/Test/IO/BaseIOTest.php
++++ b/tests/Composer/Test/IO/BaseIOTest.php
+@@ -15,12 +15,11 @@ namespace Composer\Test\IO;
+ use Composer\Config;
+ use Composer\IO\BufferIO;
+ use Composer\Test\TestCase;
++use PHPUnit\Framework\Attributes\DataProvider;
+=20
+ class BaseIOTest extends TestCase
+ {
+- /**
+- * @dataProvider provideValidGithubTokens
+- */
++ #[DataProvider('provideValidGithubTokens')]
+ public function testLoadConfigurationAcceptsValidGithubToken(string $=
token): void
+ {
+ $io =3D new BufferIO();
+diff --git a/tests/Composer/Test/IO/ConsoleIOTest.php b/tests/Composer/Tes=
t/IO/ConsoleIOTest.php
+index cf38bf4..b758635 100644
+--- a/tests/Composer/Test/IO/ConsoleIOTest.php
++++ b/tests/Composer/Test/IO/ConsoleIOTest.php
+@@ -16,6 +16,7 @@ use Composer\IO\ConsoleIO;
+ use Composer\Pcre\Preg;
+ use Composer\Test\TestCase;
+ use Symfony\Component\Console\Output\OutputInterface;
++use PHPUnit\Framework\Attributes\DataProvider;
+=20
+ class ConsoleIOTest extends TestCase
+ {
+@@ -298,10 +299,10 @@ class ConsoleIOTest extends TestCase
+ }
+=20
+ /**
+- * @dataProvider sanitizeProvider
+ * @param string|string[] $input
+ * @param string|string[] $expected
+ */
++ #[DataProvider('sanitizeProvider')]
+ public function testSanitize($input, bool $allowNewlines, $expected):=
void
+ {
+ self::assertSame($expected, ConsoleIO::sanitize($input, $allowNew=
lines));
+diff --git a/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.=
php b/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
+index 995ad89..04baa44 100644
+--- a/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
++++ b/tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php
+@@ -633,9 +633,7 @@ class ValidatingArrayLoaderTest extends TestCase
+ $this->expectNotToPerformAssertions();
+ }
+=20
+- /**
+- * @dataProvider provideMaliciousPackages
+- */
++ #[DataProvider('provideMaliciousPackages')]
+ public function testValidatePackageRejectsMaliciousMetadata(PackageIn=
terface $package, string $expectedMessage): void
+ {
+ $this->expectException(SecurityException::class);
+diff --git a/tests/Composer/Test/Util/PerforceTest.php b/tests/Composer/Te=
st/Util/PerforceTest.php
+index 8978ce0..8960767 100644
+--- a/tests/Composer/Test/Util/PerforceTest.php
++++ b/tests/Composer/Test/Util/PerforceTest.php
+@@ -18,6 +18,7 @@ use Composer\Test\Mock\ProcessExecutorMock;
+ use Composer\Util\Perforce;
+ use Composer\Test\TestCase;
+ use Composer\Util\ProcessExecutor;
++use PHPUnit\Framework\Attributes\DataProvider;
+=20
+ /**
+ * @author Matt Whittom <Matt.Whittom@veteransunited.com>
+@@ -626,9 +627,7 @@ class PerforceTest extends TestCase
+ self::assertFalse(Perforce::checkServerExists('rsh:touch /tmp/pwn=
ed', $this->processExecutor));
+ }
+=20
+- /**
+- * @dataProvider provideValidPorts
+- */
++ #[DataProvider('provideValidPorts')]
+ public function testIsValidPortAcceptsNetworkEndpoints(string $port):=
void
+ {
+ self::assertTrue(Perforce::isValidPort($port));
+@@ -653,9 +652,7 @@ class PerforceTest extends TestCase
+ ];
+ }
+=20
+- /**
+- * @dataProvider provideInvalidPorts
+- */
++ #[DataProvider('provideInvalidPorts')]
+ public function testIsValidPortRejectsNonNetworkEndpoints(string $por=
t): void
+ {
+ self::assertFalse(Perforce::isValidPort($port));
diff -Nru composer-2.8.8/debian/patches/series composer-2.8.8/debian/patche=
s/series
--- composer-2.8.8/debian/patches/series 2026-05-14 10:37:03.000000000 +0200
+++ composer-2.8.8/debian/patches/series 2026-08-29 13:39:42.000000000 +0200
@@ -19,4 +19,9 @@
0019-Merge-commit-from-fork.patch
0020-ProcessExecutor-mask-GitHub-fine-grained-access-toke.patch
0021-Fix-regexp-to-support-new-GitHub-installation-tokens.patch
-0022-Modernize-PHPUnit-syntax.patch
+0022-Merge-commit-from-fork.patch
+0023-Relax-token-validation-on-input-and-hide-more-things.patch
+0024-Merge-commit-from-fork.patch
+0025-Merge-commit-from-fork.patch
+0026-Merge-commit-from-fork.patch
+0027-Modernize-PHPUnit-syntax.patch
--ZDpaeHI7ehnNuX3V--
--M7TrM3ytDGlN7ICn
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEeHVNB7wJXHRI941mBYwc+UT2vTwFAmqS6mEACgkQBYwc+UT2
vTxuHwf/Uent8cpZVMgTSEzfFd/IvDq1XUGMaqtRv39dz7/X4XXwHCd6PjwIuegR
GLcR+cp419ASvqkWggTFqfWvPa+SCLrm6KZSrzRgLdOZmDjS+BI4sP35tdt+yGXX
5SFTuU8YM8UzeXU4d0Zw4T7wBpNYK8Owhpb+tOs7f3B4/gLiPsDKOPPQuzFsI/zf
B8xDLwPOlmpsqAskdb+TYHNhugBOuWRT4kdldz4Ih7H8Bulw4Ywjapack9Zx5deA
bpjvDcyeNa7oDG46m8Y8q2IKEf0xe0qHtmkwB4/GsiaiJIkVGPyTNPh4b4nWrOaC
ZeVkojL4lisl+0Jc1e0QB/DXxARCLw==
=qr99
-----END PGP SIGNATURE-----
--M7TrM3ytDGlN7ICn--
------------=_1795253352-3308459-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Received: (at 1146066-done) by bugs.debian.org; 21 Nov 2026 09:28:11 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
(2024-03-25) on buxtehude.debian.org
X-Spam-Level:
X-Spam-Status: No, score=-105.1 required=4.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,
SPF_PASS,USER_IN_DKIM_WELCOMELIST,VERSION autolearn=ham
autolearn_force=no version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 6; hammy, 74; neutral, 16; spammy, 0.
spammytokens: hammytokens:0.000-+--H*r:sk:coccia.,
0.000-+--H*MI:coccia, 0.000-+--H*m:coccia, 0.000-+--H*r:submission,
0.000-+--H*F:U*jmw
Return-path: <jmw@coccia.debian.org>
Received: from mitropoulos.debian.org ([2001:648:2ffc:deb:216:61ff:fe9d:958d]:60918)
by buxtehude.debian.org with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
(Exim 4.96)
(envelope-from <jmw@coccia.debian.org>)
id 1xUhOG-00Druc-1r
for 1146066-done@bugs.debian.org;
Sat, 21 Nov 2026 09:28:11 +0000
Received: via submission
from C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=coccia.debian.org,EMAIL=hostmaster@coccia.debian.org (verified)
by mitropoulos.debian.org with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
(Exim 4.96)
(envelope-from <jmw@coccia.debian.org>)
id 1xUhO8-004ies-1f
for 1146066-done@bugs.debian.org;
Sat, 21 Nov 2026 09:28:04 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=coccia.debian.org; s=smtpauto.coccia; h=Date:From:Message-Id:
Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:To:Reply-To:Cc:
Content-ID:Content-Description:In-Reply-To:References;
bh=j3C+QfqZhEAyGCz+F5Nny7uVPSJTnuL2JF6zBnHyDlM=; b=cUb+PNMZcGYIUMmokQLUjl5qFs
q2jq9QX/o6NWfdGrXhnl4g9HHHymakIKqL3+F+FfxbPqhmfYIoD/rbcixcrGjRBR1007iUieE+fM4
SLxpCE4ZPGhw/J1YgtGFfgBol8h0OkDHeD5S2eWXoJU6TL0eq08eBwmK4AzR8a97jffeeppB14icq
1jYfojtmf98i3Ol7bznxg3oCbH6XlaiZIuOZNVSSUXkzy5PjMb3u6Zg0e+Ww4V/cDvBlNAzsu0C+/
EX9918dkDBZ9Si1DADQD+FHs+MFRDH6YBX/Ry7DZcUUfKjswwfT8Pg+aPZZYIH3qRwBlS/f14poY1
ful1zqfg==;
Received: from jmw by coccia.debian.org with local (Exim 4.98.2)
(envelope-from <jmw@coccia.debian.org>)
id 1xUhO6-00000008svH-04yQ
for 1146066-done@bugs.debian.org;
Sat, 21 Nov 2026 09:28:02 +0000
To: 1146066-done@bugs.debian.org
Subject: Released in 13.8
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Message-Id: <E1xUhO6-00000008svH-04yQ@coccia.debian.org>
From: Jonathan Wiltshire <jmw@coccia.debian.org>
Date: Sat, 21 Nov 2026 09:28:02 +0000
X-CrossAssassin-Score: 99
Version: 13.8
This update was released as part of 13.8.
------------=_1795253352-3308459-0--
Technical Details
Message-ID:
<O1PJE-dfjm-109@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<O1PJE-dfjm-111@gated-at.bofh.it> <Nxsed-dYIL-7@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: "Debian Bug Tracking System" <owner@bugs.debian.org> Newsgroups: linux.debian.devel.release Subject: Bug#1146066: marked as done (trixie-pu: package composer/2.8.8-1+deb13u4) Date: Sat, 21 Nov 2026 10:40:02 +0100 Message-ID: <O1PJE-dfjm-109@gated-at.bofh.it> References: <O1PJE-dfjm-111@gated-at.bofh.it> <Nxsed-dYIL-7@gated-at.bofh.it> X-Original-To: Jonathan Wiltshire <jmw@coccia.debian.org> X-Mailbox-Line: From debian-release-request@lists.debian.org Sat Nov 21 09:36:32 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Amavis-Spam-Status: No, score=-1.7 tagged_above=-10000 required=5.3 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no autolearn_force=no MIME-Version: 1.0 X-Mailer: MIME-tools 5.510 (Entity 5.510) X-Debian-Pr-Message: closed 1146066 X-Debian-Pr-Package: release.debian.org X-Debian-Pr-Keywords: trixie Reply-To: 1146066@bugs.debian.org Content-Type: multipart/mixed; boundary="----------=_1795253352-3308459-0" X-Mailing-List: <debian-release@lists.debian.org> archive/latest/189313 List-ID: <debian-release.lists.debian.org> List-URL: <https://lists.debian.org/debian-release/> List-Archive: https://lists.debian.org/msgid-search/handler.1146066.D1146066.17952532913306146.ackdone@bugs.debian.org Approved: robomod@news.nic.it Lines: 3460 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sat, 21 Nov 2026 09:29:12 +0000 X-Original-Message-ID: <handler.1146066.D1146066.17952532913306146.ackdone@bugs.debian.org> X-Original-References: <E1xUhO6-00000008svH-04yQ@coccia.debian.org> <apLqYZjnNyX9tXr4@brocoli.tilapin.org>