Installing PHPUnit via PEAR

前端 未结 13 1342
一个人的身影
一个人的身影 2020-12-02 14:58

I have problems installing PHPUnit 3.4.6 via PEAR 1.9.0. After I discover channel pear.phpunit.de and try to use one of fo

相关标签:
13条回答
  • 2020-12-02 15:46

    I had the same problem. this worked for me:

    sudo pear clear-cache
    sudo pear channel-discover pear.phpunit.de
    sudo pear channel-discover pear.symfony-project.com
    pear install --alldeps phpunit/PHPUnit
    
    0 讨论(0)
  • 2020-12-02 15:49

    Since 2014-12-31 PEAR Installer was no longer the only installation method for PHPUnit See here : https://github.com/sebastianbergmann/phpunit/wiki/End-of-Life-for-PEAR-Installation-Method

    0 讨论(0)
  • 2020-12-02 15:49

    First off all xampp should be installed to C:\xampp

    Open a command prompt and go to C:\xampp\php

    Type the following commands in to the cmd

    pear update-channels" (updates channel definitions)

    pear upgrade (upgrades all existing packages and pear)

    pear channel-discover components.ez.no (this is needed for PHPUnit)

    pear channel-discover pear.symfony-project.com (also needed by PHPUnit)

    pear channel-discover pear.phpunit.de (This IS phpunit)

    pear install --alldeps phpunit/PHPUnit (installs PHPUnit and all dependencies)

    0 讨论(0)
  • 2020-12-02 15:50

    What is the full error message output? It failed for me until I installed using the --alldeps option and ran pear channel-discover pear.symfony-project.com

    sudo pear channel-discover pear.phpunit.de
    sudo pear channel-discover pear.symfony-project.com
    sudo pear install --alldeps phpunit/PHPUnit
    
    0 讨论(0)
  • 2020-12-02 15:54

    I had the same problem yesterday, and solved it by updating the channels

    pear clear-cache
    pear update-channels
    

    before trying to install phpUnit.

    Hope this helps.

    0 讨论(0)
  • 2020-12-02 15:58

    I tried

    pear update-channels
    

    as suggested by Davide above, but that gave me the error

    Channel pear.php.net does not support xml-rpc method channel.listAll
    

    For some reason, it worked when I ran

    pear channel-update pear.phpunit.de 
    
    0 讨论(0)
提交回复
热议问题