Skip to content

Pass File as explicit argument to RectorRunner::run() - #8565

Closed
TomasVotruba wants to merge 1 commit into
mainfrom
tv-rector-runner-file-arg
Closed

TomasVotruba wants to merge 1 commit into
mainfrom
tv-rector-runner-file-arg

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Thread the File into RectorRunner::run() as an explicit argument instead of pulling it from CurrentFileProvider inside the runner.

  • run() now takes File $file as third argument
  • drops the private getFile() lookup and the CurrentFileProvider dependency from RectorRunner
  • RectorNodeTraverser resolves the current file once in traverse() and passes it down to each run() call

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