Sheath rule
statamic-tags-directive-required-parameters
Literal Statamic
@tags definitions must provide the parameters required by
their core tag and method.
#Why
An @tags definition can dispatch a valid tag without an input that the tag
needs. The assigned result is then empty or the tag fails at runtime.
#Examples
#Bad
{{-- Both collection definitions omit a source. --}}
@tags('collection')
@tags(['articles' => ['collection' => []]])
#Good
{{-- The parameter map supplies the required collection source. --}}
@tags(['articles' => ['collection' => ['from' => 'articles']]])
#Notes
The rule uses the same Statamic 6 core requirements as component and fluent calls. Method suffixes and supported parameter aliases are included.
Dynamic parameter values and maps are skipped when they may supply the input at runtime. Static map unpacking follows write order, so a later concrete value can resolve an earlier unknown map and a later unknown map can make the result unverifiable.
#See Also
Related rules validate the directive and its tag identity:
- statamic-directive-arguments: Require a usable definition shape
- statamic-tags-directive-tag-exists: Check handles and methods
- statamic-required-tag-parameter: Check component attributes