From c0733a9cc1d558698348290e0e0f19a92bdaa2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Sun, 18 May 2025 20:30:14 +0000 Subject: [PATCH] Support for deprecated params --- src/Platform/Action.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Platform/Action.php b/src/Platform/Action.php index 9a6cba7..eb40083 100644 --- a/src/Platform/Action.php +++ b/src/Platform/Action.php @@ -166,9 +166,11 @@ public function getParams(): array * @param string $description * @param bool $optional * @param array $injections + * @param bool $skipValidation + * @param bool $deprecated * @return self */ - public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false): self + public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false, bool $deprecated = false): self { $param = [ 'default' => $default, @@ -177,6 +179,7 @@ public function param(string $key, mixed $default, Validator|callable $validator 'optional' => $optional, 'injections' => $injections, 'skipValidation' => $skipValidation, + 'deprecated' => $deprecated, // TODO: @Meldiron implement tests ]; $this->options['param:'.$key] = array_merge($param, ['type' => 'param']); $this->params[$key] = $param;