Can not find phpunit in include path...

After updating Phpstorm to latest 2018.3.1 I am running into the following problem:

Every time I am trying to run tests (phpunit) I am getting the error message:  Cannot find PHPUnit in include path (.:/usr/share/php).

We are using docker-compose for our setup, everything should be configured fine (see attached screenshots)

From the configuration it seems PHPstorm found my phpunit but instead of calling the phpunit directly it uses something like this:

[docker-compose://[.-/docker-compose.yml, ./docker-compose.dev.yml]:php/]:php" /opt/.phpstorm_helpers/phpunit.php --no-configuration /src/tests

I am quite sure, before the update it used the phpunit script directly (something like /src/vendor/phpunit/phpunit/phpunit ...). But with this /opt/.phpstorm_helpers/phpunit.php it fails.

What I am doing wrong here? Is there any way to configure to use the phpunit script directly?

3 comments

 

I am quite sure, before the update it used the phpunit script directly (something like /src/vendor/phpunit/phpunit/phpunit ...)

0

Ok, I tried to remove all configurations and start over again. Unfortunately this didn't fix the problem. And I get this only on one of my projects. Others are fine somehow and I can't detect any differences in the configuration settings.

Yes, I often have several docker-compose.yml files. Usually a docker-compose.yml as a default configuration and a dev-version and/or a test-version which extends the original one to expose additionally xdebug port 9000 or maps some volumes for easier development, etc.

Another thing I noticed is, that PHPStorm in this case completely ignores the PHP interpreter configuration. As you can see in the screenshot, there is a default phpunit.xml configuration set. But it calls:

php /opt/.phpstorm_helpers/phpunit.php --no-configuration...

At the moment I run my tests with the docker command in the terminal (as PHPStorm did before). But I would like run tests on single classes without fiddling with the phpunit --filter option on CLI.

Only, I don't know how to fix this and I don't know why some projects are working and some not.

 

 

0

Looking around it seems that https://youtrack.jetbrains.com/issue/WI-43989 is still open and that might be the reason why removing and adding the interpreter option again does not show any effect. 

Not sure, just a guess

0

Please sign in to leave a comment.