Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80503cb

Browse filesBrowse files
committed
Run security advisory filter first to avoid inconsistent states due to the optimizer not being aware of further removals coming after
Fixes #12603
1 parent 5ad6a46 commit 80503cb
Copy full SHA for 80503cb

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎src/Composer/DependencyResolver/PoolBuilder.php‎

Copy file name to clipboardExpand all lines: src/Composer/DependencyResolver/PoolBuilder.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,10 @@ public function buildPool(array $repositories, Request $request): Pool
350350

351351
$this->io->debug('Built pool.');
352352

353-
$pool = $this->runOptimizer($request, $pool);
353+
// filter vulnerable packages before optimizing the pool otherwise we may end up with inconsistent state where the optimizer took away versions
354+
// that were not vulnerable and now suddenly the vulnerable ones are removed and we are missing some versions to make it solvable
354355
$pool = $this->runSecurityAdvisoryFilter($pool, $repositories);
356+
$pool = $this->runOptimizer($request, $pool);
355357

356358
Intervals::clear();
357359

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.