upgrade phpunit windows - phpunit

I want to install PHPUnit 3.7 on my windows server. I followed the various instructions here and ended up with PHPUnit 3.4.1. When I try to install it again using:
pear update channels
pear install --alldeps phpunit/PHPUnit
I get:
phpunit/PHPUnit is already installed and is the same as the released version 3.4.15
install failed
I know that 3.4.15 is not the latest version... How can I convince PEAR that it should find an upgrade somewhere?

You probably want the --force (or -f) option on pear install:
pear install -a -f phpunit/PHPUnit
I was running into problems with PHPUnit until I found this post

Try this:
pear upgrade-all
pear upgrade phpunit/PHPUnit

I tried this and succeeded.
pear upgrade --alldeps phpunit/phpunit
If the above doesn't work for you, try the below:
pear upgrade --alldeps --force phpunit/phpunit

Did you by any chance cleared the cache?
pear clear-cache
and then update the channels, and install phpUnit.
If that fails, clear the cache, uninstall completly phpUnit, and then install it again.

Related

Install old meteorjs version

The Meteor docs and website explain how to install the latest version, with curl https://install.meteor.com/ | shor npm install -g meteor, but I need to install a particular old version. How can I install Meteor version 1.11?
You can always install the latest version and then use your project's version to boot the older version.
Meteor will respect your .meteor/release file, and if you need to create a project with a specific version you can use meteor create --release 1.2.1 yourAppName.
You can provide a release parameter for example:
curl "https://install.meteor.com/?release=1.3.3.1" | sh
Also see:
how do I install a previous version of meteor JS?

Carthage not using latest version installed

I am getting this error when using Carthage:
Please update to the latest Carthage version: 0.34.0. You currently are on 0.27.0
But I already have 0.34.0 installed. If I do brew info carthage this prints:
carthage: stable 0.34.0 (bottled), HEAD
Decentralized dependency manager for Cocoa
https://github.com/Carthage/Carthage
/usr/local/Cellar/carthage/0.34.0 (8 files, 5.2MB)
Poured from bottle on 2020-01-09 at 09:18:31
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/carthage.rb
==> Requirements
Build: xcode ✔
==> Options
--HEAD
Install HEAD version
And if I try to upgrade brew upgrade Carthage:
Warning: Carthage 0.34.0 already installed
Any idea what is happening?
Thanks
I had the same issue. No matter how many times I tried to uninstall, install, or upgrade Carthage, I always had 0.34.0!
I followed some command lines from this Answer. I totally doubt I had installed the package in the past but after I did this:
rm -rf /usr/local/bin/carthage
sudo rm -rf /Library/Frameworks/CarthageKit.framework
brew install carthage
I got this message:
So I tried:
brew upgrade carthage
And:
I might or not might work for you but it did for me...
Try running brew uninstall carthage and then brew install carthage to see what happens. For me was an error with symlink, and there was instructions on how to fix the issue.

Homebrew: How do I install PHPUnit 6.5?

I'm trying to install php unit version 6.5.
I already have 7.0.1 install and I have attempted to install phpunit versions 6.5 with:
brew install phpunit#6.5
Brew tells me that the older version is installed but phpunit --version is 7.0.1.
Trying brew switch phpunit 6.5, I get the message:
Error: phpunit does not have a version "6.5" in the Cellar.
Versions available: 7.0.1
What steps do I need to take to switch versions to 6.5?
I've installed manually:
$ wget https://phar.phpunit.de/phpunit-6.5.phar
$ chmod +x phpunit-6.5.phar
$ sudo mv phpunit-6.5.phar /usr/local/bin/phpunit
$ phpunit --version
If I am not mistaking, this is because the current version is 6.5.6 and not just 6.5
If this fails, maybe try doing a manual install from their archived package, instructions can be found here
If you still don't succeed, you could also try with composer to manage your project packages

nginx installed successfully but cannot start

I use homebrew to install nginx. However, when I start nginx, it prompts:
dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib
Referenced from: /usr/local/bin/nginx
Reason: Incompatible library version: nginx requires version 4.0.0 or later, but libpcre.1.dylib provides version 2.0.0
Trace/BPT trap: 5
Any ideas?
I had this same problem, try running this:
brew unlink pcre && brew link pcre
In my case, this was the output:
Unlinking /usr/local/Cellar/pcre/8.35... 5 symlinks removed
Linking /usr/local/Cellar/pcre/8.35... 133 symlinks created
Well, I don't know what causes the problem. I checked my pcre, and it was in latest version. Without option I just uninstall it and reinstall it again...Then it works...
Only thing that fixed it for me was reinstalling everything in brew.
https://gist.github.com/nmccready/adfae27c498e0795767f
I run the following and it sorted the issue for me
brew update && brew upgrade && brew rm extempore && brew install extempore
If you get any problem in nginx then you can debug using this command:
nginx -t
after running this command you will get error message including filename and line number where the problem is

phpUnit - File/Iterator/Autoload.php failed opening

I am trying to get phpUnit running on a centos running plesk pannel.
I have installed phpunit successfully.
Package Version State
File_Iterator 1.3.1 stable
PHPUnit 3.6.10 stable
PHPUnit_MockObject 1.1.1 stable
PHP_CodeCoverage 1.1.2 stable
PHP_Invoker 1.1.0 stable
PHP_Timer 1.0.2 stable
PHP_TokenStream 1.1.3 stable
Text_Template 1.1.1 stable
however whenever i run the phpunit command from the shell i get the following error:
PHP Warning: require_once(File/Iterator/Autoload.php): failed to open
stream: No such file or directory in
/usr/share/pear/PHPUnit/Autoload.php on line 45
PHP Fatal error:
require_once(): Failed opening required 'File/Iterator/Autoload.php'
(include_path='.:') in /usr/share/pear/PHPUnit/Autoload.php on line 45
Has anyone a clue how to solve the problem?
I tried a billion different articles and the commands that finally fixed this issue for me were the following:
sudo pear channel-discover pear.phpunit.de
sudo pear install --alldeps --force phpunit/phpunit
Then, when I ran phpunit, I didn't get the errors and it ran successfully.
I'm not sure how this translates for plesk, but the problem is the include_path specified in your php.ini file is set to just the current directory. Verify where your php.ini file is by running the following from the command line...
% php --info
...and look for the following entries...
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
In this case, edit /etc/php.ini and look for the for include_path. In my case I need to set it as follows...
include_path = ".:/opt/php-5.3.14/lib/php/pear"
Your include path must include the directory where PEAR installs all those packages. Add /usr/share/pear to your include path in php.ini--probably /etc/php5/cli/php.ini.
On the Ubuntu (10.04) I also added /usr/share/php to the /etc/php5/cli/php.ini.
In Fedora release 19 it has been solved by adding the /usr/share/pear/ path to the include_path of /etc/php.ini

Resources