Skip to content

Commit 01757cb

Browse files
committed
Ensuring only one update is suggested per package.
1 parent 649e396 commit 01757cb

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Commands/pm/SecurityUpdateCommands.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
namespace Drush\Commands\pm;
33

44
use Composer\Semver\Comparator;
5-
use Composer\Semver\Semver;
6-
use Composer\Semver\VersionParser;
75
use Consolidation\AnnotatedCommand\CommandData;
86
use Consolidation\OutputFormatters\StructuredData\RowsOfFields;
97
use Drush\Commands\DrushCommands;
@@ -209,7 +207,8 @@ protected function registerPackageSecurityUpdates(
209207
$name,
210208
$package
211209
) {
212-
if (!empty($security_advisories_composer_json['conflict'][$name])) {
210+
if (empty($this->securityUpdates[$name]) &&
211+
!empty($security_advisories_composer_json['conflict'][$name])) {
213212
$conflict_constraints = explode(',',
214213
$security_advisories_composer_json['conflict'][$name]);
215214
foreach ($conflict_constraints as $conflict_constraint) {
@@ -218,10 +217,6 @@ protected function registerPackageSecurityUpdates(
218217
if ($available_update) {
219218
$this->securityUpdates[$name] = $available_update;
220219
}
221-
else {
222-
$this->logger()
223-
->warning("Could not parse drupal-security-advisories conflicting version constraint $conflict_constraint for package $name.");
224-
}
225220
}
226221
}
227222
}

0 commit comments

Comments
 (0)