/**
* Handle an event callback for pre-dependency solving phase of an install
* or update by adding any duplicate package dependencies found during
* initial merge processing to the request that will be processed by the
* dependency solver.
*
* @param InstallerEvent $event
*/
public function onDependencySolve(InstallerEvent $event)
{
$request = $event->getRequest();
foreach ($this->state->getDuplicateLinks('require') as $link) {
$this->logger->info("Adding dependency <comment>{$link}</comment>");
$request->install($link->getTarget(), $link->getConstraint());
}
if ($this->state->isDevMode()) {
foreach ($this->state->getDuplicateLinks('require-dev') as $link) {
$this->logger->info("Adding dev dependency <comment>{$link}</comment>");
$request->install($link->getTarget(), $link->getConstraint());
}
}
}