Expand description
The root package as RootPackageLoader::load builds it
(docs/reference/RootPackageLoader.php): version (composer.json,
COMPOSER_ROOT_VERSION, git, otherwise 1.0.0+no-version-set), links,
minimum-stability, prefer-stable, and the three extractions from the
require constraints: aliases (X as Y), stability flags (@dev,
branches), references (#sha).
Structs§
- Root
Alias RootPackage::getAliases(): an alias declared in a require.- Root
Error - Root
Package - Root
Patch - What a dry run changes on the root package in memory instead of in composer.json.
Constants§
Functions§
- extract_
references RootPackageLoader::extractReferences.- extract_
stability_ flags RootPackageLoader::extractStabilityFlags.- manifest_
error VersionParser::normalizeStability. The refusalsRootPackageLoader::loadraises from the manifest alone, in its order: the root package’s own name, then — after the links are parsed, which changes nothing for a raw manifest — a package that requires itself, then the name of every link of the fiveBasePackage::$supportedLinkTypes.- merge_
plugin_ stability_ flags - composer-merge-plugin’s
ExtraPackage::mergeStabilityFlagsfor one merged file:StabilityFlags::extractAllover the file’s own requirements (an explicit@flag, the most unstable across the constraint’s parts, else the parsed stability when it is dev and not more stable than the minimum), each raised to at least the root’s current flag, thenarray_merged over the root’s flags. - normalize_
stability - root_
constraint - Constraint of a root require (with
as: the source part). - undetected_
version_ warning - The warning
RootPackageLoader::loadwrites when it gives the root package the default version (RootPackageLoader.php:91-117): noversionkey in composer.json (anullone is refused by Composer’s schema beforeload, and byload_with_versionhere), noCOMPOSER_ROOT_VERSION(PHP-truthy), and nothingguessVersioncan read from git — unless the root has noname(__root__) or is of typeproject. Anamewith a naming error throws before the version is looked at (:85-89): no warning then. Composer writes it throughIOInterface::warning, aNORMALline on stderr, each time it creates the command’sComposerinstance.