19 $this->contents = json_decode( file_get_contents( $location ),
true );
29 if ( isset( $this->contents[
'require'] ) ) {
30 foreach ( $this->contents[
'require'] as $package => $version ) {
33 if ( strpos( $package,
'/' ) !==
false ) {
49 if ( strpos( $version,
'v' ) === 0 ) {
51 $version = ltrim( $version,
'v' );
Reads a composer.json file and provides accessors to get its hash and the required dependencies.
static normalizeVersion( $version)
Strip a leading "v" from the version name.
getRequiredDependencies()
Dependencies as specified by composer.json.