Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/Model/Deployment/EnvironmentDeployment.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,23 @@ public function getRuntimeOperations(): array
* The operation name.
* @param string $service
* The name of the service or application to run the operation on.
* @param array<string, string> $parameters
* Parameters to pass to the operation, as key-value pairs.
*
*@see RuntimeOperation
* @see AppBase::getRuntimeOperations()
* @see AppBase::getRuntimeOperation()
*/
public function execRuntimeOperation(string $name, string $service): \Platformsh\Client\Model\Result
public function execRuntimeOperation(string $name, string $service, array $parameters = []): \Platformsh\Client\Model\Result
{
return $this->runOperation('operations', 'post', [
$body = [
'operation' => $name,
'service' => $service,
]);
];
if ($parameters) {
$body['parameters'] = (object) $parameters;
}

return $this->runOperation('operations', 'post', $body);
}
}