class RootPackage
The root package represents the project's composer.json and contains additional metadata
@author Jordi Boggiano <j.boggiano@seld.be>
Hierarchy
- class \Composer\Package\BasePackage implements \Composer\Package\PackageInterface
- class \Composer\Package\Package extends \Composer\Package\BasePackage
- class \Composer\Package\CompletePackage extends \Composer\Package\Package implements \Composer\Package\CompletePackageInterface
- class \Composer\Package\RootPackage extends \Composer\Package\CompletePackage implements \Composer\Package\RootPackageInterface
- class \Composer\Package\CompletePackage extends \Composer\Package\Package implements \Composer\Package\CompletePackageInterface
- class \Composer\Package\Package extends \Composer\Package\BasePackage
Expanded class hierarchy of RootPackage
6 files declare their use of RootPackage
- ArrayLoader.php in vendor/
composer/ composer/ src/ Composer/ Package/ Loader/ ArrayLoader.php - BaseDependencyCommand.php in vendor/
composer/ composer/ src/ Composer/ Command/ BaseDependencyCommand.php - DiagnoseCommand.php in vendor/
composer/ composer/ src/ Composer/ Command/ DiagnoseCommand.php - JsonLoader.php in vendor/
composer/ composer/ src/ Composer/ Package/ Loader/ JsonLoader.php - LoaderInterface.php in vendor/
composer/ composer/ src/ Composer/ Package/ Loader/ LoaderInterface.php
File
-
vendor/
composer/ composer/ src/ Composer/ Package/ RootPackage.php, line 20
Namespace
Composer\PackageView source
class RootPackage extends CompletePackage implements RootPackageInterface {
public const DEFAULT_PRETTY_VERSION = '1.0.0+no-version-set';
/** @var key-of<BasePackage::STABILITIES> */
protected $minimumStability = 'stable';
/** @var bool */
protected $preferStable = false;
/** @var array<string, BasePackage::STABILITY_*> Map of package name to stability constant */
protected $stabilityFlags = [];
/** @var mixed[] */
protected $config = [];
/** @var array<string, string> Map of package name to reference/commit hash */
protected $references = [];
/** @var list<array{package: string, version: string, alias: string, alias_normalized: string}> */
protected $aliases = [];
/**
* @inheritDoc
*/
public function setMinimumStability(string $minimumStability) : void {
$this->minimumStability = $minimumStability;
}
/**
* @inheritDoc
*/
public function getMinimumStability() : string {
return $this->minimumStability;
}
/**
* @inheritDoc
*/
public function setStabilityFlags(array $stabilityFlags) : void {
$this->stabilityFlags = $stabilityFlags;
}
/**
* @inheritDoc
*/
public function getStabilityFlags() : array {
return $this->stabilityFlags;
}
/**
* @inheritDoc
*/
public function setPreferStable(bool $preferStable) : void {
$this->preferStable = $preferStable;
}
/**
* @inheritDoc
*/
public function getPreferStable() : bool {
return $this->preferStable;
}
/**
* @inheritDoc
*/
public function setConfig(array $config) : void {
$this->config = $config;
}
/**
* @inheritDoc
*/
public function getConfig() : array {
return $this->config;
}
/**
* @inheritDoc
*/
public function setReferences(array $references) : void {
$this->references = $references;
}
/**
* @inheritDoc
*/
public function getReferences() : array {
return $this->references;
}
/**
* @inheritDoc
*/
public function setAliases(array $aliases) : void {
$this->aliases = $aliases;
}
/**
* @inheritDoc
*/
public function getAliases() : array {
return $this->aliases;
}
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|---|
BasePackage::$id | public | property | READ-ONLY: The package id, public for fast access in dependency solver @internal |
|||
BasePackage::$name | protected | property | @var string | |||
BasePackage::$prettyName | protected | property | @var string | |||
BasePackage::$repository | protected | property | @var ?RepositoryInterface | |||
BasePackage::$stabilities | Deprecated | public static | property | @phpstan-ignore property.readOnlyByPhpDocDefaultValue | ||
BasePackage::$supportedLinkTypes | public static | property | @phpstan-var array<non-empty-string, array{description: string, method: Link::TYPE_*}> @internal |
|||
BasePackage::equals | public | function | ||||
BasePackage::getFullPrettyVersion | public | function | @inheritDoc | Overrides PackageInterface::getFullPrettyVersion | ||
BasePackage::getId | public | function | @inheritDoc | Overrides PackageInterface::getId | ||
BasePackage::getName | public | function | @inheritDoc | Overrides PackageInterface::getName | ||
BasePackage::getNames | public | function | @inheritDoc | Overrides PackageInterface::getNames | ||
BasePackage::getPrettyName | public | function | @inheritDoc | Overrides PackageInterface::getPrettyName | ||
BasePackage::getPrettyString | public | function | Converts the package into a pretty readable string | Overrides PackageInterface::getPrettyString | ||
BasePackage::getRepository | public | function | @inheritDoc | Overrides PackageInterface::getRepository | ||
BasePackage::getStabilityPriority | public | function | @phpstan-return self::STABILITY_* | |||
BasePackage::getUniqueName | public | function | Returns package unique name, constructed from name, version and release type. | Overrides PackageInterface::getUniqueName | ||
BasePackage::isPlatform | public | function | checks if this package is a platform package | |||
BasePackage::packageNamesToRegexp | public static | function | Build a regexp from package names, expanding * globs as required | |||
BasePackage::packageNameToRegexp | public static | function | Build a regexp from a package name, expanding * globs as required | |||
BasePackage::setId | public | function | @inheritDoc | Overrides PackageInterface::setId | ||
BasePackage::setRepository | public | function | @inheritDoc | Overrides PackageInterface::setRepository | ||
BasePackage::STABILITIES | public | constant | ||||
BasePackage::STABILITY_ALPHA | public | constant | ||||
BasePackage::STABILITY_BETA | public | constant | ||||
BasePackage::STABILITY_DEV | public | constant | ||||
BasePackage::STABILITY_RC | public | constant | ||||
BasePackage::STABILITY_STABLE | public | constant | ||||
BasePackage::__clone | public | function | 1 | |||
BasePackage::__toString | public | function | Converts the package into a readable and unique string | Overrides PackageInterface::__toString | 1 | |
CompletePackage::$abandoned | protected | property | @var bool|string | |||
CompletePackage::$archiveExcludes | protected | property | @var string[] | |||
CompletePackage::$archiveName | protected | property | @var ?string | |||
CompletePackage::$authors | protected | property | @var array<array{name?: string, homepage?: string, email?: string, role?: string}> | |||
CompletePackage::$description | protected | property | @var ?string | |||
CompletePackage::$funding | protected | property | @var array<array{url?: string, type?: string}> | |||
CompletePackage::$homepage | protected | property | @var ?string | |||
CompletePackage::$keywords | protected | property | @var string[] | |||
CompletePackage::$license | protected | property | @var string[] | |||
CompletePackage::$repositories | protected | property | @var mixed[] | |||
CompletePackage::$scripts | protected | property | @var array<string, string[]> Map of script name to array of handlers | |||
CompletePackage::$support | protected | property | @var array{issues?: string, forum?: string, wiki?: string, source?: string, email?: string, irc?: string, docs?: string, rss?: string, chat?: string, security?: string} | |||
CompletePackage::getArchiveExcludes | public | function | @inheritDoc | Overrides CompletePackageInterface::getArchiveExcludes | ||
CompletePackage::getArchiveName | public | function | @inheritDoc | Overrides CompletePackageInterface::getArchiveName | ||
CompletePackage::getAuthors | public | function | @inheritDoc | Overrides CompletePackageInterface::getAuthors | ||
CompletePackage::getDescription | public | function | @inheritDoc | Overrides CompletePackageInterface::getDescription | ||
CompletePackage::getFunding | public | function | @inheritDoc | Overrides CompletePackageInterface::getFunding | ||
CompletePackage::getHomepage | public | function | @inheritDoc | Overrides CompletePackageInterface::getHomepage | ||
CompletePackage::getKeywords | public | function | @inheritDoc | Overrides CompletePackageInterface::getKeywords | ||
CompletePackage::getLicense | public | function | @inheritDoc | Overrides CompletePackageInterface::getLicense | ||
CompletePackage::getReplacementPackage | public | function | @inheritDoc | Overrides CompletePackageInterface::getReplacementPackage | ||
CompletePackage::getRepositories | public | function | @inheritDoc | Overrides CompletePackageInterface::getRepositories | ||
CompletePackage::getScripts | public | function | @inheritDoc | Overrides CompletePackageInterface::getScripts | ||
CompletePackage::getSupport | public | function | @inheritDoc | Overrides CompletePackageInterface::getSupport | ||
CompletePackage::isAbandoned | public | function | @inheritDoc | Overrides CompletePackageInterface::isAbandoned | ||
CompletePackage::setAbandoned | public | function | @inheritDoc | Overrides CompletePackageInterface::setAbandoned | ||
CompletePackage::setArchiveExcludes | public | function | @inheritDoc | Overrides CompletePackageInterface::setArchiveExcludes | ||
CompletePackage::setArchiveName | public | function | @inheritDoc | Overrides CompletePackageInterface::setArchiveName | ||
CompletePackage::setAuthors | public | function | @inheritDoc | Overrides CompletePackageInterface::setAuthors | ||
CompletePackage::setDescription | public | function | @inheritDoc | Overrides CompletePackageInterface::setDescription | ||
CompletePackage::setFunding | public | function | @inheritDoc | Overrides CompletePackageInterface::setFunding | ||
CompletePackage::setHomepage | public | function | @inheritDoc | Overrides CompletePackageInterface::setHomepage | ||
CompletePackage::setKeywords | public | function | @inheritDoc | Overrides CompletePackageInterface::setKeywords | ||
CompletePackage::setLicense | public | function | @inheritDoc | Overrides CompletePackageInterface::setLicense | ||
CompletePackage::setRepositories | public | function | @inheritDoc | Overrides CompletePackageInterface::setRepositories | ||
CompletePackage::setScripts | public | function | @inheritDoc | Overrides CompletePackageInterface::setScripts | ||
CompletePackage::setSupport | public | function | @inheritDoc | Overrides CompletePackageInterface::setSupport | ||
Package::$autoload | protected | property | @phpstan-var AutoloadRules | |||
Package::$binaries | protected | property | @var string[] | |||
Package::$conflicts | protected | property | @var array<string, Link> | |||
Package::$dev | protected | property | @var bool | |||
Package::$devAutoload | protected | property | @phpstan-var DevAutoloadRules | |||
Package::$devRequires | protected | property | @var array<string, Link> | |||
Package::$distMirrors | protected | property | @var ?list<array{url: non-empty-string, preferred: bool}> | |||
Package::$distReference | protected | property | @var ?string | |||
Package::$distSha1Checksum | protected | property | @var ?string | |||
Package::$distType | protected | property | @var ?non-empty-string | |||
Package::$distUrl | protected | property | @var ?non-empty-string | |||
Package::$extra | protected | property | @var mixed[] | |||
Package::$includePaths | protected | property | @var string[] | |||
Package::$installationSource | protected | property | @var 'source'|'dist'|null | |||
Package::$isDefaultBranch | protected | property | @var bool | |||
Package::$notificationUrl | protected | property | @var ?string | |||
Package::$phpExt | protected | property | @var array{priority?: int, configure-options?: list<array{name: string, description?: string}>}|null | |||
Package::$prettyVersion | protected | property | @var string | |||
Package::$provides | protected | property | @var array<string, Link> | |||
Package::$releaseDate | protected | property | @var ?\DateTimeInterface | |||
Package::$replaces | protected | property | @var array<string, Link> | |||
Package::$requires | protected | property | @var array<string, Link> | |||
Package::$sourceMirrors | protected | property | @var ?list<array{url: non-empty-string, preferred: bool}> | |||
Package::$sourceReference | protected | property | @var ?string | |||
Package::$sourceType | protected | property | @var ?string | |||
Package::$sourceUrl | protected | property | @var ?string | |||
Package::$stability | protected | property | @phpstan-var 'stable'|'RC'|'beta'|'alpha'|'dev' | |||
Package::$suggests | protected | property | @var array<string, string> | |||
Package::$targetDir | protected | property | @var ?string | |||
Package::$transportOptions | protected | property | @var mixed[] | |||
Package::$type | protected | property | @var string | |||
Package::$version | protected | property | @var string | |||
Package::convertLinksToMap | private | function | ||||
Package::getAutoload | public | function | @inheritDoc | Overrides PackageInterface::getAutoload | ||
Package::getBinaries | public | function | @inheritDoc | Overrides PackageInterface::getBinaries | ||
Package::getConflicts | public | function | @inheritDoc | Overrides PackageInterface::getConflicts | ||
Package::getDevAutoload | public | function | @inheritDoc | Overrides PackageInterface::getDevAutoload | ||
Package::getDevRequires | public | function | @inheritDoc | Overrides PackageInterface::getDevRequires | ||
Package::getDistMirrors | public | function | @inheritDoc | Overrides PackageInterface::getDistMirrors | ||
Package::getDistReference | public | function | @inheritDoc | Overrides PackageInterface::getDistReference | ||
Package::getDistSha1Checksum | public | function | @inheritDoc | Overrides PackageInterface::getDistSha1Checksum | ||
Package::getDistType | public | function | @inheritDoc | Overrides PackageInterface::getDistType | ||
Package::getDistUrl | public | function | @inheritDoc | Overrides PackageInterface::getDistUrl | ||
Package::getDistUrls | public | function | @inheritDoc | Overrides PackageInterface::getDistUrls | ||
Package::getExtra | public | function | @inheritDoc | Overrides PackageInterface::getExtra | ||
Package::getIncludePaths | public | function | @inheritDoc | Overrides PackageInterface::getIncludePaths | ||
Package::getInstallationSource | public | function | @inheritDoc | Overrides PackageInterface::getInstallationSource | ||
Package::getNotificationUrl | public | function | @inheritDoc | Overrides PackageInterface::getNotificationUrl | ||
Package::getPhpExt | public | function | @inheritDoc | Overrides PackageInterface::getPhpExt | ||
Package::getPrettyVersion | public | function | @inheritDoc | Overrides PackageInterface::getPrettyVersion | ||
Package::getProvides | public | function | @inheritDoc | Overrides PackageInterface::getProvides | ||
Package::getReleaseDate | public | function | @inheritDoc | Overrides PackageInterface::getReleaseDate | ||
Package::getReplaces | public | function | @inheritDoc | Overrides PackageInterface::getReplaces | ||
Package::getRequires | public | function | @inheritDoc | Overrides PackageInterface::getRequires | ||
Package::getSourceMirrors | public | function | @inheritDoc | Overrides PackageInterface::getSourceMirrors | ||
Package::getSourceReference | public | function | @inheritDoc | Overrides PackageInterface::getSourceReference | ||
Package::getSourceType | public | function | @inheritDoc | Overrides PackageInterface::getSourceType | ||
Package::getSourceUrl | public | function | @inheritDoc | Overrides PackageInterface::getSourceUrl | ||
Package::getSourceUrls | public | function | @inheritDoc | Overrides PackageInterface::getSourceUrls | ||
Package::getStability | public | function | @inheritDoc | Overrides PackageInterface::getStability | ||
Package::getSuggests | public | function | @inheritDoc | Overrides PackageInterface::getSuggests | ||
Package::getTargetDir | public | function | @inheritDoc | Overrides PackageInterface::getTargetDir | ||
Package::getTransportOptions | public | function | @inheritDoc | Overrides PackageInterface::getTransportOptions | ||
Package::getType | public | function | @inheritDoc | Overrides PackageInterface::getType | ||
Package::getUrls | protected | function | @phpstan-param list<array{url: non-empty-string, preferred: bool}>|null $mirrors | |||
Package::getVersion | public | function | @inheritDoc | Overrides PackageInterface::getVersion | ||
Package::isDefaultBranch | public | function | @inheritDoc | Overrides PackageInterface::isDefaultBranch | ||
Package::isDev | public | function | @inheritDoc | Overrides PackageInterface::isDev | ||
Package::replaceVersion | public | function | Replaces current version and pretty version with passed values. It also sets stability. |
|||
Package::setAutoload | public | function | Set the autoload mapping | |||
Package::setBinaries | public | function | ||||
Package::setConflicts | public | function | Set the conflicting packages | |||
Package::setDevAutoload | public | function | Set the dev autoload mapping | |||
Package::setDevRequires | public | function | Set the recommended packages | |||
Package::setDistMirrors | public | function | Overrides PackageInterface::setDistMirrors | |||
Package::setDistReference | public | function | Overrides PackageInterface::setDistReference | |||
Package::setDistSha1Checksum | public | function | ||||
Package::setDistType | public | function | Overrides PackageInterface::setDistType | |||
Package::setDistUrl | public | function | Overrides PackageInterface::setDistUrl | |||
Package::setExtra | public | function | ||||
Package::setIncludePaths | public | function | Sets the list of paths added to PHP's include path. | |||
Package::setInstallationSource | public | function | @inheritDoc | Overrides PackageInterface::setInstallationSource | ||
Package::setIsDefaultBranch | public | function | ||||
Package::setNotificationUrl | public | function | Sets the notification URL | |||
Package::setPhpExt | public | function | Sets the list of paths added to PHP's include path. | |||
Package::setProvides | public | function | Set the provided virtual packages | |||
Package::setReleaseDate | public | function | ||||
Package::setReplaces | public | function | Set the packages this one replaces | |||
Package::setRequires | public | function | Set the required packages | |||
Package::setSourceDistReferences | public | function | @inheritDoc | Overrides PackageInterface::setSourceDistReferences | ||
Package::setSourceMirrors | public | function | Overrides PackageInterface::setSourceMirrors | |||
Package::setSourceReference | public | function | Overrides PackageInterface::setSourceReference | |||
Package::setSourceType | public | function | ||||
Package::setSourceUrl | public | function | ||||
Package::setSuggests | public | function | Set the suggested packages | |||
Package::setTargetDir | public | function | ||||
Package::setTransportOptions | public | function | @inheritDoc | Overrides PackageInterface::setTransportOptions | ||
Package::setType | public | function | ||||
Package::__construct | public | function | Creates a new in memory package. | Overrides BasePackage::__construct | ||
PackageInterface::DISPLAY_DIST_REF | public | constant | ||||
PackageInterface::DISPLAY_SOURCE_REF | public | constant | ||||
PackageInterface::DISPLAY_SOURCE_REF_IF_DEV | public | constant | ||||
RootPackage::$aliases | protected | property | @var list<array{package: string, version: string, alias: string, alias_normalized: string}> | |||
RootPackage::$config | protected | property | @var mixed[] | |||
RootPackage::$minimumStability | protected | property | @var key-of<BasePackage::STABILITIES> | |||
RootPackage::$preferStable | protected | property | @var bool | |||
RootPackage::$references | protected | property | @var array<string, string> Map of package name to reference/commit hash | |||
RootPackage::$stabilityFlags | protected | property | @var array<string, BasePackage::STABILITY_*> Map of package name to stability constant | |||
RootPackage::DEFAULT_PRETTY_VERSION | public | constant | ||||
RootPackage::getAliases | public | function | @inheritDoc | Overrides RootPackageInterface::getAliases | ||
RootPackage::getConfig | public | function | @inheritDoc | Overrides RootPackageInterface::getConfig | ||
RootPackage::getMinimumStability | public | function | @inheritDoc | Overrides RootPackageInterface::getMinimumStability | ||
RootPackage::getPreferStable | public | function | @inheritDoc | Overrides RootPackageInterface::getPreferStable | ||
RootPackage::getReferences | public | function | @inheritDoc | Overrides RootPackageInterface::getReferences | ||
RootPackage::getStabilityFlags | public | function | @inheritDoc | Overrides RootPackageInterface::getStabilityFlags | ||
RootPackage::setAliases | public | function | @inheritDoc | Overrides RootPackageInterface::setAliases | ||
RootPackage::setConfig | public | function | @inheritDoc | Overrides RootPackageInterface::setConfig | ||
RootPackage::setMinimumStability | public | function | @inheritDoc | Overrides RootPackageInterface::setMinimumStability | ||
RootPackage::setPreferStable | public | function | @inheritDoc | Overrides RootPackageInterface::setPreferStable | ||
RootPackage::setReferences | public | function | @inheritDoc | Overrides RootPackageInterface::setReferences | ||
RootPackage::setStabilityFlags | public | function | @inheritDoc | Overrides RootPackageInterface::setStabilityFlags |