LoginSignup
20
19

More than 5 years have passed since last update.

homebrew+phpbrewで複数バージョンphpをインストールとxdebug、phpunitのインストール、phpstormの設定まで

Last updated at Posted at 2012-05-31

Homebrewをインストール
Homebrew — MacPorts driving you to drink? Try Homebrew!

PHPBrewをインストール
c9s/phpbrew

Requirementsの足りないものをhomebrewでインストール
phpbrewのインストールをhomebrew経由にするためFormulaを追加
Formula for phpbrew — Gist

ダウンロードして/usr/local/Library/Formulaに追加

brew install --HEAD phpbrew

以降のphpインストール、切替はphpbrewを参照

本当はphp-versionとphp-buildで管理したかったけど、
うまく行かなかったのでとりあえずこれで落ち着いた

xdebugのインストール

brew install php54-xdebug

指示に沿ってphp.iniにxdebugの設定を追記

PHPUnitをインストール
PHPUnit PEAR Channel
The symfony project PEAR channel

pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear install symfony/YAML
pear install phpunit/PHPUnit

こっちのやり方のほうがスマート
sebastianbergmann/phpunit

phpstormの設定
設定 > PHP > Development environment > Interpreterでインストールした各バージョンを指定する

20
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
19