Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AllowedPackages.php

function AllowedPackages::getTopLevelAllowedPackages

Gets all packages that are allowed in the top-level composer.json.

We will implicitly allow the projects 'drupal/legacy-scaffold-assets' and 'drupal/core' to scaffold files, if they are present. Any other project must be explicitly whitelisted in the top-level composer.json file in order to be allowed to override scaffold files.

Return value

array An array of allowed Composer package names.

1 call to AllowedPackages::getTopLevelAllowedPackages()
AllowedPackages::getAllowedPackages in composer/Plugin/Scaffold/AllowedPackages.php
Gets a list of all packages that are allowed to copy scaffold files.

File

composer/Plugin/Scaffold/AllowedPackages.php, line 120

Class

AllowedPackages
Determine recursively which packages have been allowed to scaffold files.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal