소스 검색

Make sure nameConstraints is always set when loading a name

Nils Adermann 5 년 전
부모
커밋
fc40fefa6f
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/Composer/DependencyResolver/PoolBuilder.php

+ 2 - 0
src/Composer/DependencyResolver/PoolBuilder.php

@@ -274,6 +274,8 @@ class PoolBuilder
                     if ($request->getUpdateAllowTransitiveRootDependencies() || !$this->isRootRequire($request, $replace)) {
                         $this->unfixPackage($request, $replace);
                         $loadNames[$replace] = null;
+                        // TODO should we try to merge constraints here?
+                        $this->nameConstraints[$replace] = null;
                     } elseif (!$request->getUpdateAllowTransitiveRootDependencies() && $this->isRootRequire($request, $replace) && !isset($this->updateAllowWarned[$require]) && $this->io) {
                         $this->updateAllowWarned[$replace] = true;
                         $this->io->writeError('<warning>Dependency "'.$require.'" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies to include root dependencies.</warning>');