Skip to content

Build parallel worker command line from Configuration - #9031

Merged
TomasVotruba merged 1 commit into
mainfrom
worker-command-line-from-configuration
Nov 23, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
worker-command-line-from-configuration

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Split out of #8787 - works on main with symfony/console still in place.

  • WorkerCommandLineFactory::create() takes the resolved Configuration instead of InputInterface + command class; it no longer mirrors the Symfony InputDefinition.
  • CommandFromReflectionFactory is removed.
  • ApplicationFileProcessor::run() and ParallelFileProcessor::process() no longer take InputInterface.

Forwarded to workers:

  • from Configuration: --dry-run, --clear-cache, --no-diffs, --composer-based, --php, --debug, --only (one per rule), --only-suffix, --filter (worker scopes the cache by it), --memory-limit=, --max-changes, paths
  • from raw argv via CliOptionValueResolver: --config (only when explicit), --autoload-file (space form, as bin/rector.php reads it before the container exists), --xdebug
  • always: --port, --identifier, --output-format json, --no-ansi, PHPStan Turbo -d args

Not forwarded: --no-progress-bar and --rules-summary - main process only.

Shipmonk ignore: the reflection invoke() in CommandFromReflectionFactory made shipmonk mark every __construct as used. Without it, 574 container-instantiated constructors show as dead, since shipmonk cannot see reflection instantiation. Added one shipmonk.deadMethod ignore for ::__construct, same as #8787.

Checked locally: PHPStan, ECS, full PHPUnit, parallel e2e (custom config with --config/-c, path with space, reflection resolver, unused skips), and --autoload-file/-a loaded in every worker.

@TomasVotruba
TomasVotruba force-pushed the worker-command-line-from-configuration branch from f91d58f to 7b92327 Compare November 23, 2026 21:38
@TomasVotruba
TomasVotruba force-pushed the worker-command-line-from-configuration branch from 7b92327 to 15f5754 Compare November 23, 2026 21:40
@TomasVotruba
TomasVotruba merged commit a3a9f31 into main Nov 23, 2026
51 checks passed
@TomasVotruba
TomasVotruba deleted the worker-command-line-from-configuration branch November 23, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant