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