/**
  * Dependencies currently installed according to composer.lock
  *
  * @return array
  */
 public function getInstalledDependencies()
 {
     $deps = array();
     foreach ($this->contents['packages'] as $installed) {
         $deps[$installed['name']] = array('version' => ComposerJson::normalizeVersion($installed['version']), 'type' => $installed['type'], 'licenses' => isset($installed['license']) ? $installed['license'] : array(), 'authors' => isset($installed['authors']) ? $installed['authors'] : array(), 'description' => isset($installed['description']) ? $installed['description'] : '');
     }
     return $deps;
 }
예제 #2
0
 /**
  * Dependencies currently installed according to composer.lock
  *
  * @return array
  */
 public function getInstalledDependencies()
 {
     $deps = array();
     foreach ($this->contents['packages'] as $installed) {
         $deps[$installed['name']] = array('version' => ComposerJson::normalizeVersion($installed['version']), 'type' => $installed['type']);
     }
     return $deps;
 }
예제 #3
0
 /**
  * Dependencies currently installed according to installed.json
  *
  * @return array
  */
 public function getInstalledDependencies()
 {
     $deps = [];
     foreach ($this->contents as $installed) {
         $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'] : ''];
     }
     ksort($deps);
     return $deps;
 }
예제 #4
0
 /**
  * @dataProvider provideNormalizeVersion
  * @covers ComposerJson::normalizeVersion
  */
 public function testNormalizeVersion($input, $expected)
 {
     $this->assertEquals($expected, ComposerJson::normalizeVersion($input));
 }