protected function getTopLevelAllowedPackages() { $implicit_packages =
[ 'drupal/legacy-scaffold-assets',
'drupal/core',
];
$top_level_packages =
$this->manageOptions->
getOptions()->
allowedPackages();
return array_merge($implicit_packages,
$top_level_packages);
} /**
* Builds a name-to-package mapping from a list of package names.
*
* @param string[] $packages_to_allow
* List of package names to allow.
* @param array $allowed_packages
* Mapping of package names to PackageInterface of packages already
* accumulated.
*
* @return \Composer\Package\PackageInterface[]
* Mapping of package names to PackageInterface in priority order.
*/