Skip to content

Commit

Permalink
Fix partial update where path repos are being auto-unlocked two level…
Browse files Browse the repository at this point in the history
…s deep not loading all packages properly, fixes #10431
  • Loading branch information
Seldaek committed Jan 7, 2022
1 parent 64d39a9 commit 641ad10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Composer/DependencyResolver/PoolBuilder.php
Expand Up @@ -459,6 +459,10 @@ private function loadPackage(Request $request, array $repositories, BasePackage
}
}
}
} elseif (isset($this->pathRepoUnlocked[$require]) && !isset($this->loadedPackages[$require])) {
// if doing a partial update and a package depends on a path-repo-unlocked package which is not referenced by the root, we need to ensure it gets loaded as it was not loaded by the request's root requirements
// and would not be loaded above if update propagation is not allowed (which happens if the requirer is itself a path-repo-unlocked package) or if transitive deps are not allowed to be unlocked
$this->markPackageNameForLoading($request, $require, $linkConstraint);
}
} else {
$this->markPackageNameForLoading($request, $require, $linkConstraint);
Expand Down

0 comments on commit 641ad10

Please sign in to comment.