Skip to content

Instantly share code, notes, and snippets.

@chocnut
Created January 21, 2013 10:25
Show Gist options
  • Save chocnut/4585121 to your computer and use it in GitHub Desktop.
Save chocnut/4585121 to your computer and use it in GitHub Desktop.
Setup Composer, PEAR and PHPUnit on OSX Mountain Lion
Composer:
cd /path/to/my/project
curl -s http://getcomposer.org/installer | php
sudo mv composer.phar /usr/bin/composer
composer install
php.ini
default_unicode = false
PEAR
We need PEAR! For some reason, it's not set up ready to on Lion, but the install phar file is here, so we just need to run it.
cd /usr/lib/php
sudo php install-pear-nozlib.phar
Edit/etc/php.ini and find the line: ;include_path = ".:/php/includes" and change it to:
include_path = ".:/usr/lib/php/pear"
sudo pear channel-update pear.php.net
sudo pecl channel-update pecl.php.net
sudo pear upgrade-all
PHPUnit
sudo pear channel-discover pear.phpunit.de
sudo pear install phpunit/PHPUnit
phpunit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment