reports
Generates the frontpage for Fast Forward documentation.
Description
The reports
command generates the documentation frontpage, runs tests with
coverage, and generates code metrics. It combines:
docs --target- generates API documentationtests --coverage- generates test coverage reportsmetrics --target- generates PhpMetrics HTML and JSON reports
The documentation build runs in parallel with PHPUnit, and the metrics step runs after PHPUnit so it can reuse the generated JUnit report.
Usage
composer reports
composer reports [options]
vendor/bin/dev-tools reports -- [options]
Options
--target(optional)- The target directory for the generated documentation.
Default:
.dev-tools. --coverage, -c(optional)- The target directory for the generated test coverage report.
Default:
.dev-tools/coverage. --metrics(optional)- The target directory for the generated metrics report.
Default:
.dev-tools/metrics. --progress- Enable progress output in nested
docs,tests, andmetricssteps. --json- Emit a structured machine-readable payload instead of the normal terminal output.
--pretty-json- Emit the same structured payload with indentation for terminal inspection.
Examples
Generate reports with defaults:
composer reports
Generate to custom directories:
composer reports --target=.dev-tools --coverage=.dev-tools/coverage
Generate reports with a custom metrics directory:
composer reports --metrics=.dev-tools/metrics
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success. Documentation, coverage, and metrics generated successfully. |
| 1 | Failure. One or more report stages failed. |
Behavior
- Runs
docsin parallel withtests --coverage. - Runs
metrics --targetafter tests so the JUnit report is available. - Runs tests with progress disabled by default and
--coverage-summaryso report builds keep PHPUnit output concise. - Progress output stays disabled by default across nested steps; use
--progressto re-enable it for human-readable runs. - When
--jsonor--pretty-jsonis active, it forwards JSON mode to thedocs,tests, andmetricssubprocesses and suppresses transient progress output where those tools support it. - Passes
--junit <coverage>/junit.xmlto the metrics step. - Used by the
standardscommand as the final phase. - This is the reporting stage used by GitHub Pages.
- In GitHub Actions, the queued subprocess output is emitted inside collapsible workflow groups for easier log navigation.