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

Breadcrumb

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

function InstalledVersions::getRootPackage

Same name in this branch
  1. 11.1.x vendor/composer/InstalledVersions.php \Composer\InstalledVersions::getRootPackage()

@psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}

Return value

array

1 call to InstalledVersions::getRootPackage()
DrupalFinderComposerRuntime::getComposerRoot in vendor/webflo/drupal-finder/src/DrupalFinderComposerRuntime.php
Get the path to the Composer root directory.

File

vendor/composer/composer/src/Composer/InstalledVersions.php, line 248

Class

InstalledVersions
This class is copied in every Composer installed project and available to all

Namespace

Composer

Code

public static function getRootPackage() {
    $installed = self::getInstalled();
    return $installed[0]['root'];
}

API Navigation

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