Skip to content

[6.x] Remove unused form metrics code#15066

Merged
duncanmcclean merged 1 commit into
forms-2from
forms-2-drop-metrics
Jul 23, 2026
Merged

[6.x] Remove unused form metrics code#15066
duncanmcclean merged 1 commit into
forms-2from
forms-2-drop-metrics

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Jul 23, 2026

Copy link
Copy Markdown
Member

This pull request removes the code for the "form metrics" feature which was half-built and never shipped.

Form::metrics() has been stubbed out to return collect() (with the original implementation commented out beneath it) for as long as anyone can remember, so none of the metric classes were ever instantiated. Nothing else in the codebase referenced them.

This PR removes:

  • The Statamic\Forms\Metrics classes (AbstractMetric, AverageMetric, MaxMetric, MinMetric, SumMetric, TotalMetric)
  • The Statamic\Contracts\Forms\Metric contract
  • Form::metrics(), its $metrics property, and the metrics key written out to the form's YAML
  • metrics() from the Statamic\Contracts\Forms\Form contract
  • resources/css/components/metrics.css, which was never imported into cp.css

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@duncanmcclean
duncanmcclean merged commit c316553 into forms-2 Jul 23, 2026
21 checks passed
@duncanmcclean
duncanmcclean deleted the forms-2-drop-metrics branch July 23, 2026 14:17
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.

1 participant