@runinsepareprocess的PHPStorm 8和PHPUnit问题

@runinsepareprocess的PHPStorm 8和PHPUnit问题,phpunit,phpstorm,Phpunit,Phpstorm,我正在从phpstorm8运行phpunit(编写器配置和版本4.8)。通常它工作正常,但每当我需要使用@runinsepareprocess注释时,它就会开始尖叫这个错误: Fatal error: Class 'PHPUnit_Util_Configuration' not found in - on line 334 Call Stack: 0.0013 395808 1. {main}() -:0 IDE上的PHPUnit配置如下: Language&Framework

我正在从phpstorm8运行phpunit(编写器配置和版本4.8)。通常它工作正常,但每当我需要使用@runinsepareprocess注释时,它就会开始尖叫这个错误:

Fatal error: Class 'PHPUnit_Util_Configuration' not found in - on line 334

Call Stack:
0.0013     395808   1. {main}() -:0
IDE上的PHPUnit配置如下:

  • Language&Frameworks>PHP>PHPunit:指向codebase/vendor/autoload.PHP的自定义自动加载程序
  • 运行/调试配置:指向本地phpunit.xml的替代配置文件
这是配置的内容:

<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.2/phpunit.xsd"
         colors="true"
         bootstrap="./vendor/autoload.php"
         backupGlobals="false"
         backupStaticAttributes="false"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         processIsolation="false"
         stopOnFailure="false"
         syntaxCheck="false">

    <testsuites>
        <testsuite name="My Project">
            <directory>./tests</directory>
        </testsuite>
    </testsuites>

    <filter>
        <whitelist>
            <directory suffix=".php">./src</directory>
        </whitelist>
    </filter>
</phpunit>

/测试
/src
测试使用相同的phpunit可执行文件和相同的配置文件从命令行按预期运行


有什么建议吗?

显然,从composer(phpunit 4.8.6)中删除所有依赖项并重新安装phpunit解决了问题。

Drupal员工正在使用的修复程序的修改()

添加到boostrap文件的顶部:

if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
    define('PHPUNIT_COMPOSER_INSTALL', __DIR__ . '/path/to/composer/vendors/dir/autoload.php');
}
我尝试了许多其他方法,包括升级PHPStorm和升级/降级PHPUnit。这很有效