analyze_attributes
Analyze PHP 8 attribute usage in Stellify projects. List all attributes, find missing attributes, or search for specific attribute values to audit and debug.
Instructions
Analyze PHP 8 attribute usage across a Stellify project. Useful for auditing, finding missing attributes, and searching attribute values.
Three modes:
usage (default): List all attributes used in the project with counts
Optional: file_type to filter (e.g., "model", "controller")
Returns: attribute names, counts, and files using each
missing: Find files of a specific type missing a required attribute
Required: file_type (e.g., "model", "class")
Required: attribute name (e.g., "Fillable", "FailOnUnknownFields")
Returns: files missing vs having the attribute
search: Find files where an attribute contains a specific value
Required: attribute name
Optional: value to search for in attribute args
Optional: file_type to filter
Returns: matching files with their attribute values
Example queries:
"Find every FormRequest missing FailOnUnknownFields": mode=missing, file_type=class, attribute=FailOnUnknownFields
"Find models where 'email' is fillable": mode=search, attribute=Fillable, value=email
"List all attributes used": mode=usage
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Analysis mode: "usage" (list all attributes), "missing" (find files missing an attribute), "search" (find files with specific attribute value). Default: usage. | |
| file_type | No | Filter by file type (e.g., "model", "controller", "class", "middleware"). | |
| attribute | No | Attribute name to analyze (required for "missing" and "search" modes). | |
| value | No | Value to search for in attribute arguments (for "search" mode). |