Skip to content

Commit

Permalink
Params can be specified as an array now (#156)
Browse files Browse the repository at this point in the history
Starting with 2.11.0 when the named params support was introduced in #141.

Close #153
  • Loading branch information
spaze authored Dec 19, 2022
2 parents 8648e56 + 9b53e1f commit 59afcfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ The function or method names support [fnmatch()](https://www.php.net/function.fn

### Allow with specified parameters only

You can also narrow down the allowed items when called with some parameters (doesn't apply to constants for obvious reasons). For example, you want to disallow calling `print_r()` but want to allow `print_r(..., true)`.
You can also narrow down the allowed items when called with some parameters (applies only to disallowed method, static & function calls, for obvious reasons). For example, you want to disallow calling `print_r()` but want to allow `print_r(..., true)`.
This can be done with optional `allowParamsInAllowed` or `allowParamsAnywhere` configuration keys:

```neon
Expand Down
3 changes: 3 additions & 0 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ parametersSchema:
string(),
listOf(string()),
arrayOf(anyOf(int(), string(), bool()))
listOf(arrayOf(anyOf(int(), string(), bool())))
)
)
)
Expand All @@ -45,6 +46,7 @@ parametersSchema:
string(),
listOf(string()),
arrayOf(anyOf(int(), string(), bool()))
listOf(arrayOf(anyOf(int(), string(), bool())))
)
)
)
Expand All @@ -54,6 +56,7 @@ parametersSchema:
string(),
listOf(string()),
arrayOf(anyOf(int(), string(), bool()))
listOf(arrayOf(anyOf(int(), string(), bool())))
)
)
)
Expand Down

0 comments on commit 59afcfe

Please sign in to comment.