Summary
Migrate the metrics command from the legacy Composer BaseCommand runtime to the new Symfony-command runtime proposed in #199.
This is one command-level subissue for the incremental Composer decoupling plan. It keeps the migration small enough to validate through both command entrypoints before moving to the next command.
Context
Parent issue: #199
Architecture discussion: #197
Current command class:
FastForward\DevTools\Console\Command\MetricsCommand
Migration Scope
- Convert the real command implementation to extend
Symfony\Component\Console\Command\Command instead of Composer\Command\BaseCommand.
- Remove assumptions that depend on Composer IO or
BaseCommand behavior from the real command.
- Ensure the Composer capability exposes this command through the new
ProxyCommand adapter once migrated.
- Preserve the existing command name, aliases, description, help, arguments, options, output behavior, and exit codes.
- Keep command-specific behavior in the real Symfony command or a handler, not in the Composer proxy.
Command-Specific Notes
Risk level: Medium
Runs PhpMetrics and report-summary behavior. Preserve target/junit/exclude behavior.
Acceptance Criteria
MetricsCommand no longer extends Composer\Command\BaseCommand.
- The command is available through
bin/dev-tools metrics --help.
- The command is available through Composer plugin discovery in the composer-plugin-consumer fixture.
- The Composer-facing command is a proxy when this command has been migrated.
- Existing tests for
MetricsCommand are updated to exercise the Symfony command runtime.
- At least one regression verifies that the Composer proxy can execute or display help for
metrics.
- No user-facing option, argument, alias, or help text is intentionally removed.
Non-Goals
- Do not extract this command into a separate package in this issue.
- Do not build
dev-tools-shim in this issue.
- Do not migrate unrelated commands in this issue unless required by shared infrastructure.
Summary
Migrate the
metricscommand from the legacy ComposerBaseCommandruntime to the new Symfony-command runtime proposed in #199.This is one command-level subissue for the incremental Composer decoupling plan. It keeps the migration small enough to validate through both command entrypoints before moving to the next command.
Context
Parent issue: #199
Architecture discussion: #197
Current command class:
FastForward\DevTools\Console\Command\MetricsCommandMigration Scope
Symfony\Component\Console\Command\Commandinstead ofComposer\Command\BaseCommand.BaseCommandbehavior from the real command.ProxyCommandadapter once migrated.Command-Specific Notes
Risk level: Medium
Runs PhpMetrics and report-summary behavior. Preserve target/junit/exclude behavior.
Acceptance Criteria
MetricsCommandno longer extendsComposer\Command\BaseCommand.bin/dev-tools metrics --help.MetricsCommandare updated to exercise the Symfony command runtime.metrics.Non-Goals
dev-tools-shimin this issue.