From b15ccddcd88cb8920dae46d3228fb949b17f9911 Mon Sep 17 00:00:00 2001 From: Florian Margaine Date: Fri, 27 Feb 2026 13:25:59 +0100 Subject: [PATCH] Support parameters for runtime operations Co-Authored-By: Claude Opus 4.6 --- src/Model/Deployment/EnvironmentDeployment.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Model/Deployment/EnvironmentDeployment.php b/src/Model/Deployment/EnvironmentDeployment.php index 2078be9..991c65e 100644 --- a/src/Model/Deployment/EnvironmentDeployment.php +++ b/src/Model/Deployment/EnvironmentDeployment.php @@ -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 $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); } }