Skip to content
Snippets Groups Projects

Issue #3273017: Create a validator service for Extension update to confirm they were installed via Composer

Merged Issue #3273017: Create a validator service for Extension update to confirm they were installed via Composer
3 files
+ 15
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -11,7 +11,7 @@ use Drupal\package_manager\Event\PreOperationStageEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
*
* Validates packages installed through Automatic updates extensions.
*/
class InstalledPackagesValidator implements EventSubscriberInterface {
@@ -46,6 +46,7 @@ class InstalledPackagesValidator implements EventSubscriberInterface {
}
else {
$missing_packages = $stage->getStageComposer()->getPackagesNotIn($active_composer);
// Saving only the packages whose name starts with drupal/.
$missing_packages = array_filter($missing_packages, function (string $key) {
return strpos($key, 'drupal/') === 0;
}, ARRAY_FILTER_USE_KEY);
Loading