Issues while installing pear.phpunit.de/PHPUnit

前端 未结 4 1239
死守一世寂寞
死守一世寂寞 2021-01-04 06:08

I\'m trying to tell pear that where to find PHPUnit by using this command:

sudo pear channel-discover pear.phpunit.de

The ou

相关标签:
4条回答
  • 2021-01-04 06:41

    You can't install phpunit using pear anymore: https://github.com/sebastianbergmann/phpunit/wiki/End-of-Life-for-PEAR-Installation-Method

    But you can still install it using the phar file: https://phpunit.de/getting-started.html

    Or using composer: https://phpunit.de/manual/current/en/installation.html#installation.composer

    0 讨论(0)
  • 2021-01-04 06:50

    Download the phar archive worked for me:

    https://github.com/Mayflower/PHP_CodeBrowser

    wget https://github.com/mayflower/PHP_CodeBrowser/releases/download/1.1.1/phpcb-1.1.1.phar
    mv phpcb-1.1.1.phar /usr/local/bin/phpcb
    chmod a+x /usr/local/bin/phpcb
    
    phpcb --version
    PHP_CodeBrowser version 1.1.1
    
    0 讨论(0)
  • 2021-01-04 06:50

    For those on RHEL distros (CentOS/Fedora/ etc) and not yet using composer, you can install phpunit using YUM:

    yum install phpunit
    
    0 讨论(0)
  • 2021-01-04 06:58

    Most people just composer nowadays. But since you seem to be on Ubuntu you can always do:

    sudo apt-get install phpunit
    
    0 讨论(0)
提交回复
热议问题