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] make PHPUnit environment variables configurable#18898

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
xabbuh wants to merge1 commit intosymfony:2.3fromxabbuh:phpunit-env

Conversation

@xabbuh
Copy link
Member

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

Whenever I try to use Xdebug locally while executing the Symfony test suite, I have to modify thephpunit wrapper script to pass theXDEBUG_CONFIG variable to PHPUnit. With this change, one can create.phpunit.php files locally containing something like this instead:

<?phpreturnarray('XDEBUG_CONFIG' =>'remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0',);

@nicolas-grekas
Copy link
Member

Why can't you do something like:
XDEBUG_CONFIG='remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0' ./phpunit?
proc_open forwards env vars to sub processes, isn't it?

@xabbuh
Copy link
MemberAuthor

@nicolas-grekas That doesn't seem to work. I am only able to debug the wrapper, but the env vars are not the same in the execute PHPUnit tests.

@nicolas-grekas
Copy link
Member

OK, then xdebug in the master process may be changing the env vars on purpose.
Then what about ?
XDEBUG_CONFIG='remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0' ./.phpunit/phpunit-4.8/phpunit ... (or 5.1 instead depending on your PHP version).

@xabbuh
Copy link
MemberAuthor

Ah indeed, that does work.

@xabbuhxabbuh closed thisMay 28, 2016
@xabbuhxabbuh deleted the phpunit-env branchMay 28, 2016 16:36
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.

3 participants

@xabbuh@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp