Closed bangpound closed 7 years ago
I'd like to avoid to create a new config option for this. Did you consider inferring the console command from the one that is already executing the run
command?
I did not consider it, but I will now! Thank you for the tip.
If I force push to replace the prior commit, I think github will close this pull request.
What do you think of using $_SERVER['PHP_SELF']
?
Some tests are now broken, and I'll work on them if you say this is a better direction.
When tests are running, $_SERVER['PHP_SELF']
is always phpunit
. I don't know of a way to infer the location of the console script during test runs without falling back to the Symfony 2 assumptions.
The only solution I could think of is to override that value in the RunCommand
class when the kernel environment is test
. Now tests will pass but only because RunCommand
is changing its behavior when it determines that tests are running.
I have been using the Symfony 3 directory structure. The console script called in
RunCommand
however is hard coded. This pull request exposes a new configuration valueconsole_path
which becomes the container parameterjms_job_queue.console_path
. The current standard location of the console scriptapp/console
is the default value.