MediaWiki master
Wikimedia\Composer\ComposerJson Class Reference

Reads a composer.json file and provides accessors to get its hash and the required dependencies. More...

Public Member Functions

 __construct ( $location)
 
 getRequiredDependencies ()
 Dependencies as specified by composer.json.
 

Static Public Member Functions

static normalizeVersion ( $version)
 Strip a leading "v" from the version name.
 

Detailed Description

Reads a composer.json file and provides accessors to get its hash and the required dependencies.

Since
1.25

Definition at line 11 of file ComposerJson.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Composer\ComposerJson::__construct ( $location)
Parameters
string$location

Definition at line 20 of file ComposerJson.php.

Member Function Documentation

◆ getRequiredDependencies()

Wikimedia\Composer\ComposerJson::getRequiredDependencies ( )

Dependencies as specified by composer.json.

Returns
string[]

Definition at line 29 of file ComposerJson.php.

References Wikimedia\Composer\ComposerJson\normalizeVersion().

◆ normalizeVersion()

static Wikimedia\Composer\ComposerJson::normalizeVersion ( $version)
static

Strip a leading "v" from the version name.

Parameters
string$version
Returns
string

Definition at line 50 of file ComposerJson.php.

Referenced by Wikimedia\Composer\ComposerInstalled\getInstalledDependencies(), Wikimedia\Composer\ComposerLock\getInstalledDependencies(), and Wikimedia\Composer\ComposerJson\getRequiredDependencies().


The documentation for this class was generated from the following file: