Error when trying to run project

When I try to run my php projecr I get the following error:

/usr/bin/php /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php --no-configuration /Users/LM/Sites/test

Testing started at 9:10 PM ...

 

 

Warning: require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php on line 39PHP Warning:  require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php on line 39

 

 

PHP Stack trace:

Call Stack:

PHP   1. {main}() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:0

 

    0.0015     869152   1. {main}() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:0

PHP   2. IDE_PHPUnit_Loader::init() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:204

    0.0015     869152   2. IDE_PHPUnit_Loader::init() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:204

PHP   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:198

 

PHP Fatal error:  require_once(): Failed opening required 'PHPUnit/Runner/Version.php' (include_path='.:/usr/local/pear/share/pear') in /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php on line 39

    0.0016     869152   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:198

PHP Stack trace:

 

 

PHP   1. {main}() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:0

Fatal error: require_once(): Failed opening required 'PHPUnit/Runner/Version.php' (include_path='.:/usr/local/pear/share/pear') in /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php on line 39

PHP   2. IDE_PHPUnit_Loader::init() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:204

 

 

PHP   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:198

Call Stack:

    0.0015     869152   1. {main}() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:0

    0.0015     869152   2. IDE_PHPUnit_Loader::init() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:204

    0.0016     869152   3. IDE_PHPUnit_Loader::detectPHPUnitVersionId() /private/var/folders/z5/9z3jhjk11fn8g4y0dkv6t1300000gn/T/ide-phpunit.php:198

 

 

Process finished with exit code 255

Any ideas how to fix it?
2 comments

Hi there,

Please check my comment from this thread: http://devnet.jetbrains.com/message/5487756#5487756

The original author did not respond, so I have no idea if he managed to solve his issue and what he did for that.

P.S.
If PHPUnit installed via PEAR, try reinstalling it (PHPUnit) completely (full remove and then install again).

Alternatively -- use composer, install PHPUnit using it and configure PhpStorm to use this installation instead.

0

Thanks for the response.

My problem was that phpunit was not istall correctly. Uninstalling and reinstaling with the following command solved my issue:

pear install --force --alldeps phpunit/PHPUnit

http://stackoverflow.com/a/9971710/352959
0

Please sign in to leave a comment.