Installing PHPunit via Pear

Installing PHPUnit via PEAR

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

pear clear-cache
pear update-channels

before trying to install phpUnit.

Windows Installing PHPUnit via PEAR - Installing PHPUnit via PEAR

I'm a really newbie but hope to be of any help.

I just succeeded installing PHPUnit a moment ago.

My env. is Wamp2.1.

I don't know exactly how this works but it worked for me, so try this.

pear clear-cache then,

pear install -a -f phpunit/PHPUnit

Somewhere in the failing message, I saw something about cache so I used clear-cache.

It did some trick in installing process, I guess.

Good luck!

How do I correctly install PHPUnit with PEAR?

I had the same problem while upgrading my phpunit.

This solved the problem:

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

Then run:

pear install --alldeps pear.phpunit.de/PHPUnit

OBS: I think the pear install pear.symfony.com/Yaml is not necessary. I'm just posting it because it is exactly the way I solved my problem.

installing phpunit/PHPUnit-3.5.5 via pear (for sonar)

To get this from the unanswered questions page: See How to install an older version of PHPUnit through PEAR? for an exact answer to your problem.

Installing PHPUnit 3.8 via Pear

It looks like 3.8 has been remove from the pear repo.

http://pear.phpunit.de/

Installing PEAR and PHPUnit with xampp

It seems the issue is not with PHPUnit but with your pear installation in general.

The user you run the install with does not have the privileges to create the needed folders.

Ether fix those permissions or start the cmd prompt with admin privileges (windowsbutton & enter "cmd" then strg+shift+enter) and rerun the commands.

Install phpunit on windows

Old answer (2014):
It's said that phpunit will not be available via PEAR since December 2014.

So it's easy to install it using composer:

composer global require "phpunit/phpunit=4.1.*"

Update 2019: it should be installed as a local (for your project) development package:

 composer require --dev phpunit/phpunit ^8

Update 2020: it should be installed as a local (for your project) development package:
composer require --dev phpunit/phpunit ^9.3



Related Topics



Leave a reply



Submit