Installing PHPUnit via PEAR

前端 未结 13 1340
一个人的身影
一个人的身影 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:33

    It simply installs me when I type:

    pear channel-discover pear.phpunit.de
    pear install --onlyreqdeps phpunit/PHPUnit
    

    Maybe there is a problem with the versions, you may set the preferred_state of the pear packages to different than stable:

    pear config-set preferred_state beta
    
    0 讨论(0)
  • 2020-12-02 15:41

    I had an issue with not having a required dependency YAML, so got a warning each time.

    Try pear channel-discover pear.symfony.com pear install pear.symfony.com/Yaml

    then run the download again

    pear install --alldeps pear.phpunit.de/PHPUnit
    
    0 讨论(0)
  • 2020-12-02 15:42

    You need to also discover the ezcomponents channel using pear channel-discover components.ez.no

    In total:

    sudo pear channel-discover pear.phpunit.de
    sudo pear channel-discover pear.symfony-project.com
    sudo pear channel-discover components.ez.no
    sudo pear install --alldeps phpunit/PHPUnit
    

    You can have a quick sanity check is to run phpunit from the CLI and see if the command is recognized.

    UPDATE

    Seems they've moved symfony, I just did a fresh install today, here's the new channel

    sudo pear channel-discover pear.symfony.com
    
    0 讨论(0)
  • 2020-12-02 15:43

    Please follow these steps:

      1. pear config-set auto_discover 1
      2. pear install pear.phpunit.de/PHPUnit -> here I got: installation failed.
      3. Try: pear clear-cache -> executed successfully
      4. pear update-channels -> executed successfully
      5. pear install pear.phpunit.de/PHPUnit -> successfully executed.
    0 讨论(0)
  • 2020-12-02 15:44

    I had the same problem, try:

    pear clear-cache
    
    0 讨论(0)
  • 2020-12-02 15:45

    I had struggled for ages with getting ZEND etc to work on XAMPP on Windows Vista. For reference, this is how I solved it: -

    Couldn't update PEAR then I realised it's default path setting were wrong, I correct this guide...

    http://david-franklin.net/programming/installing-pear-phpunit-on-windows/

    Then I managed to get PHPUNIT installed with the pear clear_cache command thanks to this thread then ran "pear install phpunit/PHPunit".

    I hope what I wrote above will serve as a quick code for those in a similar predicament (it took me 2 whole days to get it working!!!)

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