Skip to content

Commit e1c7ab4

Browse files
authored
Merge pull request #169 from utopia-php/feat-deprecated-params
Feat: deprecated params
2 parents 64c7b7b + 26f6c5a commit e1c7ab4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Hook.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,10 @@ public function inject(string $injection): static
197197
* @param bool $optional
198198
* @param array $injections
199199
* @param bool $skipValidation
200+
* @param bool $deprecated
200201
* @return static
201202
*/
202-
public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false): static
203+
public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false, bool $deprecated = false): static
203204
{
204205
$this->params[$key] = [
205206
'default' => $default,
@@ -208,6 +209,7 @@ public function param(string $key, mixed $default, Validator|callable $validator
208209
'optional' => $optional,
209210
'injections' => $injections,
210211
'skipValidation' => $skipValidation,
212+
'deprecated' => $deprecated,
211213
'value' => null,
212214
'order' => count($this->params) + count($this->injections),
213215
];

0 commit comments

Comments
 (0)