X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Fcomposer%2FComposerLock.php;h=818ccdf3a2db0e2271435b1d8554b76767fcd44e;hp=9c7bf2f9ac2d28b5e6ae5bc21d02e076e747908f;hb=ce079cf6ad79ca8d3360817f809b219d166f9153;hpb=44aec8a00a9f0f92a746ca575b58147fea1135e5 diff --git a/includes/libs/composer/ComposerLock.php b/includes/libs/composer/ComposerLock.php index 9c7bf2f9ac..818ccdf3a2 100644 --- a/includes/libs/composer/ComposerLock.php +++ b/includes/libs/composer/ComposerLock.php @@ -15,22 +15,21 @@ class ComposerLock { $this->contents = json_decode( file_get_contents( $location ), true ); } - public function getHash() { - return $this->contents['hash']; - } - /** * Dependencies currently installed according to composer.lock * * @return array */ public function getInstalledDependencies() { - $deps = array(); + $deps = []; foreach ( $this->contents['packages'] as $installed ) { - $deps[$installed['name']] = array( + $deps[$installed['name']] = [ 'version' => ComposerJson::normalizeVersion( $installed['version'] ), 'type' => $installed['type'], - ); + 'licenses' => isset( $installed['license'] ) ? $installed['license'] : [], + 'authors' => isset( $installed['authors'] ) ? $installed['authors'] : [], + 'description' => isset( $installed['description'] ) ? $installed['description']: '', + ]; } return $deps;