| @@ 82-95 (lines=14) @@ | ||
| 79 | * @param string $packageName format "foo/bar foo/bar:1.0.0" |
|
| 80 | * @return array |
|
| 81 | */ |
|
| 82 | public function execRequire($packageName) |
|
| 83 | { |
|
| 84 | $packageName = explode(" ", trim($packageName)); |
|
| 85 | $output = $this->runCommand(array( |
|
| 86 | 'command' => 'require', |
|
| 87 | 'packages' => $packageName, |
|
| 88 | '--no-interaction' => true, |
|
| 89 | '--profile' => true, |
|
| 90 | '--prefer-dist' => true, |
|
| 91 | '--ignore-platform-reqs' => true, |
|
| 92 | )); |
|
| 93 | ||
| 94 | return OutputParser::parseRequire($output); |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * Run remove command |
|
| @@ 103-115 (lines=13) @@ | ||
| 100 | * @param string $packageName format "foo/bar foo/bar:1.0.0" |
|
| 101 | * @return bool |
|
| 102 | */ |
|
| 103 | public function execRemove($packageName) |
|
| 104 | { |
|
| 105 | $packageName = explode(' ', trim($packageName)); |
|
| 106 | $this->runCommand(array( |
|
| 107 | 'command' => 'remove', |
|
| 108 | 'packages' => $packageName, |
|
| 109 | '--ignore-platform-reqs' => true, |
|
| 110 | '--no-interaction' => true, |
|
| 111 | '--profile' => true, |
|
| 112 | )); |
|
| 113 | ||
| 114 | return true; |
|
| 115 | } |
|
| 116 | ||
| 117 | /** |
|
| 118 | * Get require |
|