While in the middle of a conference call with my offshore team, I had this bright idea of upgrading my current installation of phpunit into whatever the latest one is. Should be a straight forward upgrade from 3.4.13 to 3.5.3 right? Not!
The steps I followed were pretty easy. uninstall current version and its dependencies using the “pear uninstall” command, then reinstall using “pear install -a”.
I typed “which phpunit” and the console gave me the expected result. I then followed up with “phpunit -v” which should give me the upgraded version and everything in the world will be right, but it had different plans. The moment i pressed the return key after typing that command, I got an error message mentioning that the required fileloader.php file is missing. 5 minutes in, I decided that I can’t give it much thought since I was still in the middle of a conference call
So I let things go and concentrated on my call. After that was done I went through a series of uninstalls/reinstalls of phpunit but to no avail. Three hours and a couple of interruptions later, I decided to trace through all the dependencies and found out that all entries in my bash profile was somehow blown away which pretty much included the path declaration of my local PEAR install, not only that but the include_file entry in my php.ini was somehow changed.
I restored the php.ini file from default and added my customizations then tweaked my bash profile and walah! still didn’t work. But there was a glimmer of hope since I’m now getting a different error message, of which I am familiar with.
A quick smack in the head and I was done. Turns out when copy-pasting the include file location I missed a “.” in the include_files entry in my php.ini file.
All is well now but I still have questions as to why my bash profile entries were all blown away and how my php.ini was changed.
I might never know and can’t really care that much since I have other stuff to do. I didn’t do it. The leprechaun probably did.
- Tags: phpunit macosx