From 4f44b7b2213ca41e40e2ee34402dfe5871d69115 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 30 Jan 2020 22:49:15 +0100 Subject: [PATCH] Remove unused policy function findUpdatePackages --- src/Composer/DependencyResolver/DefaultPolicy.php | 13 ------------- src/Composer/DependencyResolver/PolicyInterface.php | 3 --- 2 files changed, 16 deletions(-) diff --git a/src/Composer/DependencyResolver/DefaultPolicy.php b/src/Composer/DependencyResolver/DefaultPolicy.php index 0b978ec59..859410752 100644 --- a/src/Composer/DependencyResolver/DefaultPolicy.php +++ b/src/Composer/DependencyResolver/DefaultPolicy.php @@ -44,19 +44,6 @@ class DefaultPolicy implements PolicyInterface return $constraint->matchSpecific($version, true); } - public function findUpdatePackages(Pool $pool, PackageInterface $package, $mustMatchName = false) - { - $packages = array(); - - foreach ($pool->whatProvides($package->getName(), null, $mustMatchName) as $candidate) { - if ($candidate !== $package) { - $packages[] = $candidate; - } - } - - return $packages; - } - public function selectPreferredPackages(Pool $pool, array $literals, $requiredPackage = null) { $packages = $this->groupLiteralsByName($pool, $literals); diff --git a/src/Composer/DependencyResolver/PolicyInterface.php b/src/Composer/DependencyResolver/PolicyInterface.php index d4db7f3a9..49e23b041 100644 --- a/src/Composer/DependencyResolver/PolicyInterface.php +++ b/src/Composer/DependencyResolver/PolicyInterface.php @@ -20,8 +20,5 @@ use Composer\Package\PackageInterface; interface PolicyInterface { public function versionCompare(PackageInterface $a, PackageInterface $b, $operator); - - public function findUpdatePackages(Pool $pool, PackageInterface $package); - public function selectPreferredPackages(Pool $pool, array $literals, $requiredPackage = null); }