You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for creating such a useful tool. I've been using it for a few days, and it has definitely improved my developer experience.
I would like to request the addition of a feature that allows setting arbitrary environment variables during test execution.
I'm confident that this feature would make the tool even more convenient in several use cases.
Using Xdebug
Enabling Xdebug significantly slows down execution, so I prefer to disable it by default:
[xdebug]xdebug.mode = off
xdebug.start_with_request = yes
and only enable it via environment variables when needed:
$ XDEBUG_MODE=debug phpunit
Utilizing Framework Features
Many frameworks have features that allow controlling behavior through environment variables. For example, in Laravel, we can switch the configuration files loaded by setting APP_ENV.
For instance, running phpunit from the command line is intended for CI environments, whereas executing it from a GUI tool allows us to run each test individually. Such switching can make testing more efficient:
$ APP_ENV=phpunit-for-vs-code phpunit
Feature Request
It seems that these functionalities are not currently available in PHPUnit for VSCode.
When I added the above settings to phpunit.php or phpunit.phpunit, the tests failed to start. It appears that the entire string is recognized as the execution command.
Adding -d xdebug.mode=debug to phpunit.args did not work either. It seems that the environment variables need to be set before the PHP command is executed.
I would appreciate your consideration.
Sincerely,
The text was updated successfully, but these errors were encountered:
Hello Tsai,
Thank you for creating such a useful tool. I've been using it for a few days, and it has definitely improved my developer experience.
I would like to request the addition of a feature that allows setting arbitrary environment variables during test execution.
I'm confident that this feature would make the tool even more convenient in several use cases.
Using Xdebug
Enabling Xdebug significantly slows down execution, so I prefer to disable it by default:
and only enable it via environment variables when needed:
Utilizing Framework Features
Many frameworks have features that allow controlling behavior through environment variables. For example, in Laravel, we can switch the configuration files loaded by setting
APP_ENV
.For instance, running
phpunit
from the command line is intended for CI environments, whereas executing it from a GUI tool allows us to run each test individually. Such switching can make testing more efficient:Feature Request
It seems that these functionalities are not currently available in PHPUnit for VSCode.
phpunit.php
orphpunit.phpunit
, the tests failed to start. It appears that the entire string is recognized as the execution command.-d xdebug.mode=debug
tophpunit.args
did not work either. It seems that the environment variables need to be set before the PHP command is executed.I would appreciate your consideration.
Sincerely,
The text was updated successfully, but these errors were encountered: