/** * Include the constraint of root dependency version in the constraint * of installed package. * * @param PackageInterface $package The installed package * @param Link $link The link contained installed constraint * * @return Link The link with root and installed version constraint */ private function includeRootConstraint(PackageInterface $package, Link $link) { if (isset($this->requires[$package->getName()])) { /* @var Link $rLink */ $rLink = $this->requires[$package->getName()]; $useConjunctive = FilterUtil::checkExtraOption($this->package, 'asset-optimize-with-conjunctive'); $constraint = new MultiConstraint(array($rLink->getConstraint(), $link->getConstraint()), $useConjunctive); $link = new Link($rLink->getSource(), $rLink->getTarget(), $constraint, 'installed', $constraint->getPrettyString()); } return $link; }