Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques statiques | |
static | getInstalledPackages () |
static | getInstalledPackagesByType ($type) |
static | isInstalled ($packageName, $includeDevRequirements=true) |
static | satisfies (VersionParser $parser, $packageName, $constraint) |
static | getVersionRanges ($packageName) |
static | getVersion ($packageName) |
static | getPrettyVersion ($packageName) |
static | getReference ($packageName) |
static | getInstallPath ($packageName) |
static | getRootPackage () |
static | getRawData () |
static | getAllRawData () |
static | reload ($data) |
Fonctions membres privées statiques | |
static | getInstalled () |
Attributs privés statiques | |
static | $installed |
static | $canGetVendors |
static | $installedByVendor = array() |
This class is copied in every Composer installed project and available to all
See also https://getcomposer.org/doc/07-runtime.md#installed-versions
To require its presence, you can require composer-runtime-api ^2.0
|
static |
Returns the raw data of all installed.php which are currently loaded for custom implementations
|
staticprivate |
Références $loader, $vendorDir, __DIR__, elseif, et null.
|
static |
Returns a list of all package names which are present, either by being installed, replaced or provided
|
static |
|
static |
string | $packageName |
Références null.
|
static |
string | $packageName |
Références null.
|
static |
Returns the raw installed.php data for custom implementations
|
static |
string | $packageName |
Références null.
|
static |
Référencé par DebugClassLoader\checkAnnotations().
|
static |
string | $packageName |
Références null.
|
static |
Returns a version constraint representing all the range(s) which are installed for a given package
It is easier to use this via isInstalled() with the $constraint argument if you need to check whether a given version of a package is installed, and not just whether it exists
string | $packageName |
|
static |
Checks whether the given package is installed
This also returns true if the package name is provided or replaced by another package
string | $packageName | |
bool | $includeDevRequirements |
|
static |
Lets you reload the static array from another file
This is only useful for complex integrations in which a project needs to use this class but then also needs to execute another project's autoloader in process, and wants to ensure both projects have access to their version of installed.php.
A typical case would be PHPUnit, where it would need to make sure it reads all the data it needs from this class, then call reload() with require $CWD/vendor/composer/installed.php
(or similar) as input to make sure the project in which it runs can then also use this class safely, without interference between PHPUnit's dependencies and the project's dependencies.
array[] | $data A vendor/composer/installed.php data set |
-param 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[]}>} $data
Références $data.
|
static |
Checks whether the given package satisfies a version constraint
e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
Composer::satisfies(new VersionParser, 'foo/bar', '^2.3')
VersionParser | $parser | Install composer/semver to have access to this class and functionality |
string | $packageName | |
string | null | $constraint | A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package |
|
staticprivate |
|
staticprivate |
|
staticprivate |