b036f05c05a4bcd9fb218f75f7c157375a896ef8
4 * Reads an installed.json file and provides accessors to get what is
9 class ComposerInstalled
{
16 * @param string $location
18 public function __construct( $location ) {
19 $this->contents
= json_decode( file_get_contents( $location ), true );
23 * Dependencies currently installed according to installed.json
27 public function getInstalledDependencies() {
29 foreach ( $this->contents
as $installed ) {
30 $deps[$installed['name']] = [
31 'version' => ComposerJson
::normalizeVersion( $installed['version'] ),
32 'type' => $installed['type'],
33 'licenses' => $installed['license'] ??
[],
34 'authors' => $installed['authors'] ??
[],
35 'description' => $installed['description'] ??
'',