ide-phpunit.php vs phpunit

I know that previous projects always used ide-phpunit.php, today am having a problem with that file as it's trying to load the PHP_CodeCoverage_Filter and we don't use code coverage.

However, in checking this, I realized that another project does not use that file, but seems to call \vendor\phpunit\phpunit\phpunit directly. Both projects appear to be configured the same, except that one is PHP 5.6 and the other is PHP 7.0. 

Is the reason why ide-phpunit.php is still being used in one because of the PHP version?

7 comments
Comment actions Permalink

I just answered my own question. Yes, when I switch my interpreter to PHP 7.0, it launches phpunit and not ide-phpunit.php. Why is that?

0
Comment actions Permalink

It depends on a PhpUnit configuration you're using. Could you describe it?

0
Comment actions Permalink

I'm not sure what you mean. I use Composer autoloader. I have a custom configuration file (both projects use a file that is very similar).

0
Comment actions Permalink

I'll clarify this within few days

0
Comment actions Permalink

We are using the old script (ide-phpunit.php) if IDE fails to determine the version phpunit.
Do you have a standard structured composer files (eg custom values "vendor-dir" and "bin-dir" in composer.json - it might break IDE's phpunit detection)?
Also (more likely) your PHP7 provides additional warnings in output that prevents IDE to parse phpunit version.

 

Please go to Help > Debug log settings > add "com.jetbrains.php" line (without quotes). Then please restart PhpStorm, reproduce the issue and provide us your idea.log file (Help > Show log in...).

Also please provide the output of following command run from terminal/command line:

<path_to_php7> <path_to_phpunit_exe> --version

0
Comment actions Permalink

"Do you have a standard structured composer files (eg custom values "vendor-dir" and "bin-dir" in composer.json - it might break IDE's phpunit detection)?"

Yes, I'm not using these directives.

I'll do the log file, but I still don't understand. All I am doing is in PHPStorm, changing the Interpreter from PHP 7.0 to PHP 5.6. These 2 are almost identical except for the PHP versions

C:\>c:\PHP\php C:\jenkins-php-tools\vendor\phpunit\phpunit\phpunit --version
PHPUnit 5.4.6 by Sebastian Bergmann and contributors.

 

0
Comment actions Permalink

Well, I guess this is a dead issue for me. We've now upgraded all of our instances to PHP 7. I would like to figure this out in case I do see it again, but I can't get a working PHP 5.6 installation going without lots of other problems with these projects, so for now I'll just drop it.

0

Please sign in to leave a comment.