Just bumped into Phing, and thought I’d share my experiences. Installing Phing is easy enough. Phing is a build system in the shape of a PHP Pear package, that can do many things. To quote Hans Lillelid, this could include for instance configuring, packaging, uploading and testing. Ideal for building installable Joomla zip-files, which is what I am using it for right now.
This is how I set up Phing to run on my local MAMP-based webserver. MAMP = Apache, MySQL and PHP, on a Mac, much like WAMP and LAMP for Windows and Linux respectively.
These are just very brief instructions, specifically on how I did this on my own system. A complete documentation on Phing can be found on at phing.info. You don’t actually need MAMP either, it was just what I was working with to begin with.
Open the application Terminal. You can find pear by doing a locate call: locate pear.
Currently MAMP requires you to install it into /Applications, so you should find pear (for php5) here: /Applications/MAMP/bin/php5/bin/.
Make sure MAMP is using the correct php version, by starting MAMP and checking your preferences.
1: Go to the correct folder:
2: Make sure pear can locate the package:
./pear channel-discover pear.phing.info
3: Install phing:
./pear install phing/phing
Phing should now be installed. Run the command “ls -al” and you should see phing in the same folder as pear.
You can now run this command:
This will give you an overview of the phing’s options.
From here you can for instance just run:
./phing -f /path/to/your/build.xml