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. --cache-dir(optional)- Base cache directory for nested
docsandtestscaches. When omitted, each nested tool keeps its own default cache directory. --cache- Force cache-aware nested documentation and test steps to keep caching enabled.
--no-cache- Force cache-aware nested documentation and test steps to disable caching.
--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
Generate reports with cache disabled for nested docs and tests:
composer reports --no-cache
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. - Cache stays enabled by default for nested cache-aware steps; omit both flags
to keep the command default, pass
--cacheto force it on, and pass--no-cacheto force it off. - The explicit cache intent is propagated to the nested
docsandtestssteps. Themetricsstep does not consume this contract. - When
--cache-diris provided,docsandtestsreceive nested cache directories under that base path. When it is omitted, each nested tool keeps its own default cache directory. - 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.