Skip to content

Commit 465c4d1

Browse files
committed
meh
1 parent 15fa0be commit 465c4d1

2 files changed

Lines changed: 23 additions & 6 deletions

File tree

docs/tools/chorale/commands/plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ chorale plan [<vendor/name>] [options]
2626
- `-v`: detailed blocks (per‑section details)
2727
- `-vv`: detailed blocks + no‑op summaries
2828
- `-vvv`: everything above plus full JSON plan printed at the end
29+
- `--composer-only`: Only include composer-related steps; exclude split steps
2930
- `--show-all`: Include no‑op summaries (same as `-vv` or higher)
3031
- `--json`: Output as JSON; ideal for `apply` or external tooling
3132
- `--project-root=PATH`: Explicit project root (defaults to current directory)
@@ -122,6 +123,5 @@ Example snippet (root update):
122123

123124
## Tips
124125

125-
- Use `--concise` for quick scans, and omit it to see exact JSON diffs.
126126
- Combine the positional `<vendor/name>` with `--json` to isolate and export a single package’s plan.
127127
- For CI checks, run with `--strict` so the command exits non‑zero when action is required.

tools/chorale/src/Console/PlanCommand.php

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ protected function configure(): void
5656
- -v: detailed blocks
5757
- -vv: detailed + include no-op summaries
5858
- -vvv: everything above plus full JSON plan at end
59+
Other options:
60+
- --composer-only: Only include composer-related steps; exclude split steps.
5961
6062
Notes
6163
- Delta notation [+added/-removed/~changed] summarizes composer map changes.
@@ -67,8 +69,7 @@ protected function configure(): void
6769
->addOption('project-root', null, InputOption::VALUE_REQUIRED, 'Project root (default: CWD).')
6870
->addOption('paths', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Limit to specific package paths', [])
6971
->addOption('json', null, InputOption::VALUE_NONE, 'Output as JSON instead of human-readable.')
70-
// --concise retained for compatibility; default output is concise
71-
->addOption('concise', null, InputOption::VALUE_NONE, 'Force one-line summaries only; omit detailed blocks.')
72+
->addOption('composer-only', null, InputOption::VALUE_NONE, 'Only include composer-related steps; exclude split steps.')
7273
->addOption('show-all', null, InputOption::VALUE_NONE, 'Show no-op summaries (does not turn them into steps).')
7374
->addOption('force-split', null, InputOption::VALUE_NONE, 'Force split steps even if unchanged.')
7475
->addOption('verify-remote', null, InputOption::VALUE_NONE, 'Verify remote state if lockfile is missing/stale.')
@@ -83,10 +84,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8384
/** @var list<string> $paths */
8485
$paths = (array) $input->getOption('paths');
8586
$json = (bool) $input->getOption('json');
87+
$composerOnly = (bool) $input->getOption('composer-only');
8688
$verbosity = $output->getVerbosity();
87-
$explicitConcise = (bool) $input->getOption('concise');
88-
// Concise by default; -v or higher switches to detailed unless --concise is given
89-
$concise = $explicitConcise || ($verbosity <= OutputInterface::VERBOSITY_NORMAL);
89+
// Concise by default; increase detail with -v/-vv/-vvv
90+
$concise = ($verbosity <= OutputInterface::VERBOSITY_NORMAL);
9091
// Show no-op summaries at -vv or when explicitly requested
9192
$showAll = (bool) $input->getOption('show-all') || ($verbosity >= OutputInterface::VERBOSITY_VERY_VERBOSE);
9293
$force = (bool) $input->getOption('force-split');
@@ -112,6 +113,22 @@ protected function execute(InputInterface $input, OutputInterface $output): int
112113
$steps = $result['steps'] ?? [];
113114
$noop = $result['noop'] ?? [];
114115

116+
if ($composerOnly) {
117+
$composerTypes = [
118+
'package-version-update',
119+
'package-metadata-sync',
120+
'composer-root-update',
121+
'composer-root-merge',
122+
'composer-root-rebuild',
123+
];
124+
$steps = array_values(array_filter(
125+
$steps,
126+
static fn(PlanStepInterface $s): bool => in_array($s->type(), $composerTypes, true)
127+
));
128+
// Suppress noop summary to avoid confusion with filtered output
129+
$noop = [];
130+
}
131+
115132
if ($json) {
116133
$payload = [
117134
'version' => 1,

0 commit comments

Comments
 (0)