Skip to content

Commit 1e33b7c

Browse files
authored
Merge pull request #36 from utopia-php/feat-deprecated-params
add deprecated params
2 parents 028ff7c + 4ca2b81 commit 1e33b7c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Platform/Action.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,11 @@ public function getParams(): array
166166
* @param string $description
167167
* @param bool $optional
168168
* @param array $injections
169+
* @param bool $skipValidation
170+
* @param bool $deprecated
169171
* @return self
170172
*/
171-
public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false): self
173+
public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false, bool $deprecated = false): self
172174
{
173175
$param = [
174176
'default' => $default,
@@ -177,6 +179,7 @@ public function param(string $key, mixed $default, Validator|callable $validator
177179
'optional' => $optional,
178180
'injections' => $injections,
179181
'skipValidation' => $skipValidation,
182+
'deprecated' => $deprecated, // TODO: @Meldiron implement tests
180183
];
181184
$this->options['param:'.$key] = array_merge($param, ['type' => 'param']);
182185
$this->params[$key] = $param;

0 commit comments

Comments
 (0)