function InstalledVersions::getRawData
Same name in this branch
- 11.1.x vendor/composer/InstalledVersions.php \Composer\InstalledVersions::getRawData()
Returns the raw installed.php data for custom implementations
@psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
Return value
array[]
Deprecated
Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
File
-
vendor/
composer/ composer/ src/ Composer/ InstalledVersions.php, line 262
Class
- InstalledVersions
- This class is copied in every Composer installed project and available to all
Namespace
ComposerCode
public static function getRawData() {
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = (include __DIR__ . '/installed.php');
}
else {
self::$installed = array();
}
}
return self::$installed;
}