How do I correctly install PHPUnit with PEAR?

前端 未结 8 783
甜味超标
甜味超标 2021-01-31 08:22

I have had to de- and reinstall a newer version of PHPUnit following these directions. Now when I\'m launching this line

sudo pear install --alldeps phpunit/PHPU         


        
相关标签:
8条回答
  • 2021-01-31 08:59
    sudo pear install -a phpunit
    sudo pear channel-discover pear.phpunit.de
    

    I had similar problem complaining about "Unknown remote channel: pear.symfony.com". had to do (without sudo, I got weird error about cannot open some file)

    sudo pear channel-discover pear.symfony.com
    

    then

    sudo pear install phpunit/PHPUnit
    

    Now I can see phpunit in my /usr/bin

    0 讨论(0)
  • 2021-01-31 09:00

    First: locate pear you may have multiple versions installed and this could be a pain.

    At work we have something like this in our intranet:

    sudo [your pear install] channel-update pear.php.net  
    sudo [your pear install] upgrade pear  
    sudo [your pear install] channel-discover pear.phpunit.de  
    sudo [your pear install] install --alldeps phpunit/PHPUnit
    

    I know theres a more automated way to install it using: go-pear ( http://pear.php.net/manual/en/installation.getting.php )

    However, if you already have some other install of pear it will totally wreck everything and you'll spend quite some time trying to fix it. I think the biggest hurdle is being able to tell all the libraries where each other is.

    0 讨论(0)
提交回复
热议问题