$event->addError($missing_projects,$this->t('Automatic Updates can only update projects that were installed via Composer. The following packages are not installed through composer:'));
else{
$missing_packages=$stage->getStageComposer()
->getPackagesNotIn($active_composer);
// For new dependency added in the stage will are only concerned with
// ones that are Drupal projects that have Update XML from Drupal.org
// Since the Update module does allow use to check any of these projects
// if they don't exist in the active code base. Other types of projects
// even if they are in the 'drupal/' namespace they would not have
// Update XML on Drupal.org so it doesn't matter if they are in the
// Removing drupal/ from package name for better user presentation.
$project=str_replace('drupal/','',$package);
$missing_projects[]=$project;
}
if($missing_projects){
$event->addError($missing_projects,$this->t('Automatic Updates can only update projects that were installed via Composer. The following packages are not installed through composer:'));
}
}
}
}
}
}
...
@@ -94,4 +59,55 @@ class PackagesInstalledWithComposerValidator implements EventSubscriberInterface
...
@@ -94,4 +59,55 @@ class PackagesInstalledWithComposerValidator implements EventSubscriberInterface
];
];
}
}
/**
* Gets the packages which aren't installed via composer.