recca0120 / vscode-phpunit

The VS Code Test Explorer extension for PHPUnit
MIT License
130 stars 44 forks source link

v3.4.10: Cannot longer run tests with PHP instance in Docker Container + Windows #210

Open pjaydev opened 15 hours ago

pjaydev commented 15 hours ago

I cannot run my PHP tests anymore since the update to v3.4.10.

When starting a test, the circle next to the test name keeps spinning, but nothing happens and there is no log output. There is also no way to cancel the test once started (cancel requests are ignored).

I have my PHP instance including PHPUnit running inside a Docker container, and I initiate the test using a Powershell script (a workaround since the arguments were not properly passed, if I directly used docker compose exec ... as command) .

This is my configuration:

{
    "phpunit.command": "powershell ${workspaceFolder}\\docker\\phpunit_docker.ps1",
    "phpunit.php": "",
    "phpunit.paths": {"${workspaceFolder}" : "/var/www/html"}
}

This is the powershell script .\docker\phpunit_docker.ps1:

param(
    [Parameter(ValueFromRemainingArguments = $true)]
    [string[]]$Args
)

$command = "docker"
$commandArgs = @("compose", "exec", "web", "vendor/bin/phpunit") + $Args

& $command @commandArgs

Up to v.3.4.9, this approach worked absolutely fine.