MediaWiki  REL1_31
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. More...
 

Static Public Member Functions

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

Detailed Description

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

Since
1.25

Definition at line 9 of file ComposerJson.php.

Constructor & Destructor Documentation

◆ __construct()

ComposerJson::__construct (   $location)
Parameters
string$location

Definition at line 14 of file ComposerJson.php.

References contents.

Member Function Documentation

◆ getRequiredDependencies()

ComposerJson::getRequiredDependencies ( )

Dependencies as specified by composer.json.

Returns
array

Definition at line 23 of file ComposerJson.php.

References as, contents, and normalizeVersion().

◆ normalizeVersion()

static ComposerJson::normalizeVersion (   $version)
static

Strip a leading "v" from the version name.

Parameters
string$version
Returns
string

Definition at line 44 of file ComposerJson.php.

Referenced by ComposerInstalled\getInstalledDependencies(), ComposerLock\getInstalledDependencies(), getRequiredDependencies(), and ComposerJsonTest\testNormalizeVersion().


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