Skip to content

[console] Resolve bootstrap CLI options without symfony/console ArgvInput - #9027

Merged
TomasVotruba merged 1 commit into
mainfrom
cli-option-value-resolver
Nov 23, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
cli-option-value-resolver

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Split out of #8787 - the parts that do not need entropy and work on main with symfony/console still in place.

  • New Rector\Bootstrap\CliOptionValueResolver reads --name value, --name=value, -c value, -c=value from raw argv, stops at --.
  • RectorConfigsResolver and AutoloadFileParameterResolver use it instead of ArgvInput.
  • ExitCode::SUCCESS/FAILURE are literal 0/1, no Command import.
  • ParallelFileProcessor compares worker exit code against ExitCode::SUCCESS.

Behavior note: ArgvInput::getParameterOption() also matched glued short form -cpath, and returned =path for -c=path. Now -c=path resolves correctly and -cpath is not supported (-a same).

Split out of #8787: RectorConfigsResolver and AutoloadFileParameterResolver read
--config/-c and --autoload-file/-a from raw argv via new CliOptionValueResolver.
ExitCode uses literal ints, ParallelFileProcessor compares against ExitCode::SUCCESS.
@TomasVotruba
TomasVotruba merged commit d8960be into main Nov 23, 2026
51 checks passed
@TomasVotruba
TomasVotruba deleted the cli-option-value-resolver branch November 23, 2026 21:23
@TomasVotruba TomasVotruba changed the title Resolve bootstrap CLI options without symfony/console ArgvInput [console] Resolve bootstrap CLI options without symfony/console ArgvInput Nov 23, 2026
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