Skip to content

[6.x] Add fieldtype inspection commands - #15737

Merged
duncanmcclean merged 5 commits into
6.xfrom
fieldtype-inspector-commands
Oct 29, 2026
Merged

duncanmcclean merged 5 commits into
6.xfrom
fieldtype-inspector-commands

Conversation

@jackmcdade

Copy link
Copy Markdown
Member

Expose the installed fieldtype registry and configuration definitions through two read-only commands, so agents and developers can inspect valid settings without reading individual PHP classes or maintaining a separate schema.

php please fieldtypes:list --json
php please fieldtypes:show bard --json

The output includes the Statamic version, registered fieldtype metadata, configuration defaults/options/conditions, and shared field options. It respects add-on registrations and appended configuration. Configuration controls use editor_type; opaque PHP values and JavaScript-provided toolbar choices are marked unresolved rather than guessed. Without --json, the commands produce a table or YAML. Unknown handles return a failure exit code and a JSON error when requested.

Validation: 14 focused tests / 195 assertions pass, covering every registered core fieldtype, add-on configuration, aliases, unresolved values, errors, and Artisan/Please discovery. Laravel Pint passes for all five changed PHP files.

@duncanmcclean
duncanmcclean merged commit b047485 into 6.x Oct 29, 2026
64 checks passed
@duncanmcclean
duncanmcclean deleted the fieldtype-inspector-commands branch October 29, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants