All rules

Sheath rule

statamic-fluent-tag-exists

Executed literal Statamic fluent calls must use a registered tag handle.
Package
Statamic
Category
Blade
Default severity
error by default
Auto-fix
Manual fix

#Why

Statamic::tag() builds a fluent tag object. An unknown literal handle fails when that object is fetched, converted to output, read, or iterated.

#Examples

#Bad

{{-- missing_tag is not registered. --}}
{{ Statamic::tag('missing_tag') }}

#Good

{{-- collection is registered and receives its source. --}}
{{ Statamic::tag('collection')->from('articles') }}

#Execution Detection

The rule checks literal calls that reach an execution surface. These include a Blade or PHP echo, fetch(), string conversion, concatenation, array access, foreach, yield from, and supported iterator conversion functions.

Constructing an object without consuming it is not reported:

@php
$tag = Statamic::tag('missing_tag');
@endphp

#Notes

Dynamic tag names are skipped. Literal-looking text, comments, and PHP strings are not treated as calls. Registered add-on tags, aliases, and application registry replacements are accepted. Handle matching is case-sensitive.

#See Also

Related rules validate the remainder of an executed fluent call: