Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Closed

Conversation

@xabbuh
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

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).

tjaari and julienfalque reacted with thumbs up emoji
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
Copy link
Member

but env vars are propagated to the subprocess, aren't they?

@xabbuh
Copy link
MemberAuthor

Maybe I am doing something completely wrong, but for me it did not behave that way.

@linaori
Copy link
Contributor

Maybe this behavior is OS dep? Though I thought this was default behavior of php.

@xabbuh
Copy link
MemberAuthor

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
Copy link
Contributor

julienfalque commentedDec 29, 2016
edited
Loading

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 withphp -dzend_extension=xdebug.so .... This works pretty well unless the script is in a child process, like withsimple-phpunit.

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
Copy link
Member

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

julienfalque reacted with thumbs up emoji

@xabbuh
Copy link
MemberAuthor

@nicolas-grekas That's indeed a good idea and it seems to work as expected (see#21112).

@xabbuhxabbuh modified the milestones:3.3,3.xDec 31, 2016
@nicolas-grekas
Copy link
Member

Closing in favor of#21112

@xabbuhxabbuh deleted the phpunit-bridge-display-cmd branchJanuary 2, 2017 16:48
fabpot added a commit that referenced this pull requestJan 2, 2017
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
@nicolas-grekasnicolas-grekas modified the milestone:3.xMar 24, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@xabbuh@nicolas-grekas@linaori@julienfalque@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp