Skip to content

PHPUnit execution fails due to ""docker.exe": executable file not found in %PATH%" #187

@shochdoerfer

Description

@shochdoerfer

Is there an existing issue for this?

  • I have searched the existing issues

Are you sure that this bug is related to this DDEV Integration Plugin?

  • I am sure

Enter your error report ID (If available)

No response

Describe the bug

This may or may not be similar to #152.

I have 2 DDEV projects, pretty similar setups. The minor difference is that a different database is used. In one project, the PHPUnit integration works out of the box, thanks to the defaults configured by this plugin. In the other project, I got the following error when I try to execute PHPUnit:

exec: "docker.exe": executable file not found in %PATH%
Current PATH : 

The issue seems to be that PHPStorm can't find the PHP installation in the CLI interpreter configured by DDEV. When trying to find the interpreter PHPStorm returns an error "Failed to parse validation script output"

php

The same also happens for a colleague when cloning the repo. We don't share the .idea directory via Git, so both installations on 2 different laptops behave exactly the same.

Interestingly I was able to manually fix this problem this morning by adding another CLI interpreter with the exact same settings as defined by the DDEV one. Once I assigned that manually added CLI interpreter to the PHPUnit configuration, it executed just fine.

I compared both .idea directories of the project with a working DDEV setup and the project where it did not work. And the only difference I could spot was a missing <component name="PhpInterpretersPhpInfoCache"> element in the php.xml configuration. When I copied that part into the project that was not working, PHPStorm at least did not show me an error in the UI, but still, I could not execute PHPUnit.

Most likely, this seems to be a regression or a bug in PHPStorm. Not sure if this plugin can do something about it.

Steps to reproduce

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions