phpunit can't run from inside PHPStorm

Is there some config option I'm missing so that PHPStorm can work with phpunit.phar after v4.0? I get:

XDebug could not open the remote debug file '/var/log/xdebug.log'.
PHP Warning:  require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in /tmp/ide-phpunit.php on line 49
PHP Stack trace:
PHP   1. {main}() /tmp/ide-phpunit.php:0
PHP   2. IDE_PHPUnit_Loader::init() /tmp/ide-phpunit.php:209
PHP   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /tmp/ide-phpunit.php:196
PHP Fatal error:  require_once(): Failed opening required 'PHPUnit/Runner/Version.php' (include_path='.:/usr/share/pear') in /tmp/ide-phpunit.php on line 49
PHP Stack trace:
PHP   1. {main}() /tmp/ide-phpunit.php:0
PHP   2. IDE_PHPUnit_Loader::init() /tmp/ide-phpunit.php:209
PHP   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /tmp/ide-phpunit.php:196


The PHPUnit developer (https://github.com/sebastianbergmann/phpunit/issues/1167) says:

"Please note that starting with PHPUnit 4.0.0 the PEAR package of PHPUnit is merely a distribution mechanism for the PHP Archive (PHAR) and that many of PHPUnit's dependencies will no longer be released individually via PEAR. We will eventually stop making releases of PHPUnit available via PEAR altogether."

You...are trying to include a file directly that should be included directly.

2 comments
Comment actions Permalink

Hi there,

PhpStorm works just fine with PHPUnit v4 -- be it PHAR or installed via Composer

PhpStorm v8.0.3 works fine with PHPUnit v4.5 (any type of intallation); v4.6 PHAR support is added in v9 (currently at EAP stage); Composer version of v4.6 still works even in v8

0
Comment actions Permalink

Ah, so I need to roll phpunit back to v4.5, then.

0

Please sign in to leave a comment.