0

我有一个严重的问题,将 PHPUnit 降级到 3.7.21 到 3.5.15

我这样做:

pear uninstall phpunit/PHPunit 

//卸载OK //我检查了,PHP单元安装时间更长

然后 :

pear install phpunit/PHPUnit-3.5.15


C:\wamp\www\portailmg\dev\tests>pear install phpunit/PHPUnit-3.5.15
Unknown remote channel: pear.symfony-project.com
Did not download optional dependencies: pear/XML_RPC2, use --alldeps to download
 automatically
Did not download optional dependencies: phpunit/PHP_Invoker, use --alldeps to do
wnload automatically
phpunit/PHPUnit requires package "channel://pear.symfony-project.com/YAML" (vers
ion >= 1.0.2)
phpunit/PHPUnit can optionally use package "pear/XML_RPC2"
phpunit/PHPUnit can optionally use PHP extension "dbus"
phpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1.1
.0, version <= 1.1.99)
downloading DbUnit-1.2.3.tgz ...
Starting to download DbUnit-1.2.3.tgz (41,769 bytes)
............done: 41,769 bytes
downloading PHPUnit_Selenium-1.3.0.tgz ...
Starting to download PHPUnit_Selenium-1.3.0.tgz (42,240 bytes)
...done: 42,240 bytes
downloading PHPUnit-3.7.21.tgz ...
Starting to download PHPUnit-3.7.21.tgz (118,818 bytes)
...done: 118,818 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.7.21
install ok: channel://pear.phpunit.de/DbUnit-1.2.3
install ok: channel://pear.phpunit.de/PHPUnit_Selenium-1.3.0

然后,当我通过这样做检查当前的 PHPUnit 版本时:phpunit -version

我安装了旧版本 3.7.21 !

谁能帮我 ?谢谢

PS:我试过这个但不适用于 PHPUnit:

pear uninstall phpunit/PHPUnit
 pear uninstall phpunit/DbUnit
 pear uninstall phpunit/PHP_CodeCoverage
 pear uninstall phpunit/File_Iterator
 pear uninstall phpunit/PHP_Timer
 pear uninstall phpunit/PHPUnit_MockObject
 pear uninstall phpunit/Text_Template
 pear uninstall phpunit/PHPUnit_Selenium
 pear uninstall pear.symfony-project.com/YAML
 pear uninstall phpunit/PHP_TokenStream




 pear install pear.symfony-project.com/YAML-1.0.2
 pear install phpunit/PHPUnit_Selenium-1.0.1
 pear install phpunit/Text_Template-1.0.0
 pear install phpunit/PHPUnit_MockObject-1.0.3
 pear install phpunit/PHP_Timer-1.0.0
 pear install phpunit/File_Iterator-1.2.3
 pear install phpunit/PHP_TokenStream-1.0.1
 pear install phpunit/PHP_CodeCoverage-1.0.2
 pear install phpunit/DbUnit-1.0.0
 pear install phpunit/PHPUnit-3.5.15
4

3 回答 3

3
pear uninstall phpunit/PHPUnit
 pear uninstall phpunit/DbUnit
 pear uninstall phpunit/PHP_CodeCoverage
 pear uninstall phpunit/File_Iterator
 pear uninstall phpunit/PHP_Timer
 pear uninstall phpunit/PHPUnit_MockObject
 pear uninstall phpunit/Text_Template
 pear uninstall phpunit/PHPUnit_Selenium
 pear uninstall pear.symfony-project.com/YAML
 pear uninstall phpunit/PHP_TokenStream




 pear install pear.symfony-project.com/YAML-1.0.2 --alldeps
 pear install phpunit/PHPUnit_Selenium-1.0.1 --alldeps
 pear install phpunit/Text_Template-1.0.0 --alldeps
 pear install phpunit/PHPUnit_MockObject-1.0.3 --alldeps
 pear install phpunit/PHP_Timer-1.0.0 --alldeps
 pear install phpunit/File_Iterator-1.2.3 --alldeps
 pear install phpunit/PHP_TokenStream-1.0.1 --alldeps
 pear install phpunit/PHP_CodeCoverage-1.0.2 --alldeps
 pear install phpunit/DbUnit-1.0.0 --alldeps
 pear install phpunit/PHPUnit-3.5.15 --alldeps
于 2013-05-28T09:37:51.373 回答
1

通过作曲家安装它:

{
    ...
    "repositories": [
        {
            "type": "pear",
            "url": "pear.symfony-project.com"
        },
        {
            "type": "pear",
            "url": "pear.phpunit.de"
        }
    ],
    "require-dev": {
        "pear-pear.phpunit.de/phpunit": "3.5.15",
        "pear-pear.phpunit.de/PHP_CodeCoverage": "1.0.*",
        "pear-pear.phpunit.de/File_Iterator": "1.2.3"
    }
}
于 2014-04-16T21:55:16.393 回答
0

看起来好像 phpunit 3.5.15 目前无法通过 PEAR 获得

https://github.com/sebastianbergmann/phpunit/issues/924

于 2014-06-20T12:30:32.903 回答