git-php
git-php copied to clipboard
Make $commandProcessor 'protected'
so that it can be used by sub class of Runners.
Hello, what is your use-case? Why do you need this change?
Hello, what is your use-case? Why do you need this change?
I need to extend CliRunner
to support more options. And that requires an extended CommandProcessor
.
In the extended CliRunner
, I need to use the extended CommmandProcessor
.
In the meanwhile, I don't want to copy all of the code in CliRunner::run()
to the extended CliRunner
.
In on word, both CliRunner
and the extended CliRunner
need to access $commandProcessor
.
I need to extend CliRunner to support more options. And that requires an extended CommandProcessor.
Can you give me some examples? Maybe exists better solution.
I need to extend CliRunner to support more options. And that requires an extended CommandProcessor.
Can you give me some examples? Maybe exists better solution.
For example, I need -c
option to specify ssh key file which is not the default one. -c
has to go to after git
but before sub command.
The current implementation is CommandProcesser
always put options after sub command.
Actually, I think -c
is worth a set of specific API. So I created another PR#91.
This PR is still needed for other similar cases.