在新的SilverStripe安装上运行dev / build?flush = all时出现以下错误,通过composer安装,在Ubuntu Precise(12.04)Vagrant VM上运行:
Fatal error: Cannot redeclare non static PHPUnit_Framework_TestCase::$dependencies as static SapphireTest::$dependencies in /var/www/silverstripe/framework/dev/SapphireTest.php on line 12
Stack trace:
1. {main}() /var/www/silverstripe/framework/main.php:0
2. Director::direct() /var/www/silverstripe/framework/main.php:189
3. Director::handleRequest() /var/www/silverstripe/framework/control/Director.php:152
4. Controller->handleRequest() /var/www/silverstripe/framework/control/Director.php:366
5. RequestHandler->handleRequest() /var/www/silverstripe/framework/control/Controller.php:153
6. Controller->handleAction() /var/www/silverstripe/framework/control/RequestHandler.php:200
7. RequestHandler->handleAction() /var/www/silverstripe/framework/control/Controller.php:194
8. DevelopmentAdmin->build() /var/www/silverstripe/framework/control/RequestHandler.php:288
9. Controller->handleRequest() /var/www/silverstripe/framework/dev/DevelopmentAdmin.php:146
10. RequestHandler->handleRequest() /var/www/silverstripe/framework/control/Controller.php:153
11. Controller->handleAction() /var/www/silverstripe/framework/control/RequestHandler.php:200
12. RequestHandler->handleAction() /var/www/silverstripe/framework/control/Controller.php:194
13. DatabaseAdmin->index() /var/www/silverstripe/framework/control/RequestHandler.php:288
14. DatabaseAdmin->build() /var/www/silverstripe/framework/model/DatabaseAdmin.php:80
15. DatabaseAdmin->doBuild() /var/www/silverstripe/framework/model/DatabaseAdmin.php:100
16. class_exists() /var/www/silverstripe/framework/model/DatabaseAdmin.php:204
17. SS_ClassLoader->loadClass() /var/www/silverstripe/framework/core/manifest/ClassLoader.php:0
18. require_once() /var/www/silverstripe/framework/core/manifest/ClassLoader.php:77
19. SS_ClassLoader->loadClass() /var/www/silverstripe/framework/core/manifest/ClassLoader.php:0
20. require_once() /var/www/silverstripe/framework/core/manifest/ClassLoader.php:77
21. SS_ClassLoader->loadClass() /var/www/silverstripe/framework/core/manifest/ClassLoader.php:0
22. require_once() /var/www/silverstripe/framework/core/manifest/ClassLoader.php:77
我的composer.json是:
{
"name": "silverstripe/installer",
"description": "The SilverStripe Framework Installer",
"require": {
"php": ">=5.3.2",
"silverstripe/cms": "3.*",
"silverstripe/framework": "3.*",
"undefinedoffset/sortablegridfield": "dev-master"
},
"config": {
"process-timeout": 600
},
"minimum-stability": "stable"
}
答案 0 :(得分:1)
您的PHPUnit版本太旧了。你需要运行至少3.5.8,但最好是更新。