Skip to content

Extract AutoloadFileParameterResolver from bin, add tests#8035

Merged
samsonasik merged 1 commit into
rectorphp:mainfrom
SanderMuller:refactor/autoload-file-parameter-resolver
Jun 11, 2026
Merged

Extract AutoloadFileParameterResolver from bin, add tests#8035
samsonasik merged 1 commit into
rectorphp:mainfrom
SanderMuller:refactor/autoload-file-parameter-resolver

Conversation

@SanderMuller

@SanderMuller SanderMuller commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

The last revision of #8034 missed the merge by two minutes — this is it.

Moves the parameter registration from inline bin code into a small class, no behavior change, and adds tests: all three CLI spellings (--autoload-file path, --autoload-file=path, -a path) resolve to the same value, no flag leaves the parameter untouched, and registering it changes the configuration hash.

Follow-up to rectorphp#8034, which merged before its last revision: the parameter
registration moves from inline bin code into a unit-testable class. Tests
pin that every CLI spelling (--autoload-file path, --autoload-file=path,
-a path) resolves to the same real path, that the parameter stays
untouched without the flag, and that registering it changes
FileHashComputer's configuration hash.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@samsonasik

Copy link
Copy Markdown
Member

@SanderMuller ok, I am merging it, but this PR and previous PR #8034 is not yet verifiable on our real projects, and I may need to verify which one which it cause a behaviour change, so we may revert these later.

@samsonasik samsonasik merged commit 5c5fd4d into rectorphp:main Jun 11, 2026
64 checks passed
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.

2 participants