Add output in why-not for when a package requires a platform package and it is not found, fixes #5259

main
Jordi Boggiano 8 years ago
parent 40df5dddee
commit 65a4719251

@ -121,7 +121,7 @@ abstract class BaseRepository implements RepositoryInterface
if (in_array($rootReq->getTarget(), $pkg->getNames()) && !$rootReq->getConstraint()->matches($link->getConstraint())) { if (in_array($rootReq->getTarget(), $pkg->getNames()) && !$rootReq->getConstraint()->matches($link->getConstraint())) {
$results[] = array($package, $link, false); $results[] = array($package, $link, false);
$results[] = array($rootPackage, $rootReq, false); $results[] = array($rootPackage, $rootReq, false);
break 2; continue 3;
} }
} }
$results[] = array($package, $link, false); $results[] = array($package, $link, false);
@ -132,7 +132,11 @@ abstract class BaseRepository implements RepositoryInterface
} }
} }
break; continue 2;
}
if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $link->getTarget())) {
$results[] = array($package, new Link($package->getName(), $link->getTarget(), null, 'requires', $link->getPrettyConstraint().' but it is missing'), false);
} }
} }
} }

Loading…
Cancel
Save