Skip to content

Commit 197fb03

Browse files
committed
wip
2 parents 8ae668d + ecf81c1 commit 197fb03

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

readme.md

+4
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ $server->installPapertrail(array $data);
107107
$server->removePapertrail();
108108
$server->enableOPCache();
109109
$server->disableOPCache();
110+
$server->upgradePHP();
110111
```
111112

112113
## Server SSH Keys
@@ -167,6 +168,9 @@ $forge->removePapertrail($serverId);
167168
// OPCache
168169
$forge->enableOPCache($serverId);
169170
$forge->disableOPCache($serverId);
171+
172+
// PHP
173+
$forge->upgradePHP($serverId);
170174
```
171175

172176
## Server Daemons

src/Actions/ManagesServers.php

+10
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,14 @@ public function disableOPCache($serverId)
241241
{
242242
$this->delete("servers/$serverId/php/opcache");
243243
}
244+
245+
/**
246+
* Upgrade to latest PHP version.
247+
*
248+
* @param $serverId
249+
*/
250+
public function upgradePHP($serverId)
251+
{
252+
$this->post("servers/$serverId/php/upgrade");
253+
}
244254
}

src/Resources/Server.php

+10
Original file line numberDiff line numberDiff line change
@@ -284,4 +284,14 @@ public function disableOPCache()
284284
{
285285
return $this->forge->disableOPCache($this->id);
286286
}
287+
288+
/**
289+
* Upgrade to latest PHP version.
290+
*
291+
* @return Server
292+
*/
293+
public function upgradePHP()
294+
{
295+
return $this->forge->upgradePHP($this->id);
296+
}
287297
}

0 commit comments

Comments
 (0)