Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[PhpUnitBridge] display the command being executed#21083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
If you want to pass environment variables to your tests (for example, tomake use of Xdebug), you need to execute the actual process being run bythe PHPUnit bridge wrapper. Displaying the commands being executed makesit easier to run them yourself.
nicolas-grekas commentedDec 28, 2016
but env vars are propagated to the subprocess, aren't they? |
xabbuh commentedDec 28, 2016
Maybe I am doing something completely wrong, but for me it did not behave that way. |
linaori commentedDec 28, 2016
Maybe this behavior is OS dep? Though I thought this was default behavior of php. |
xabbuh commentedDec 29, 2016
I investigated this a bit further. The issue does not seem to be that the environment variable is not inherited by the child process, but that Xdebug somehow does not work within the subprocess (maybe because there is still an open connection inside the parent process that blocks the child process from establishing the connection?). In any case, being able to easily figure out what command is actually executed helps to run this very command on your own. |
julienfalque commentedDec 29, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I experienced the same problem. I'm not sure it's the best solution but on my setup the extension is not loaded at all for CLI to avoid slowing down PHP commands. When I want to debug a script, I run it with I don't think a fix is possible for my use case because, as far as I know, there is no way to detect this runtime configuration to forward it to the child process. But displaying the command so I can run it manually will definitely help. |
nicolas-grekas commentedDec 29, 2016
an alternative idea could be to not call a sub process but continue in the same for the simple case where no concurrency is involved, if possible |
xabbuh commentedDec 31, 2016
@nicolas-grekas That's indeed a good idea and it seems to work as expected (see#21112). |
nicolas-grekas commentedJan 2, 2017
Closing in favor of#21112 |
This PR was merged into the 3.3-dev branch.Discussion----------[PhpUnitBridge] run PHPUnit in the same process| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#21083| License | MIT| Doc PR |Commits-------1986278 [PhpUnitBridge] run PHPUnit in the same process
If you want to pass environment variables to your tests (for example, to make use of Xdebug), you need to execute the actual process being run by the PHPUnit bridge wrapper. Displaying the commands being executed makes it easier to run them yourself (see also a previous discussion in#18898).