macのphpにintlを追加した

CakePHP3がリリースされましたのでとりあえずインストールだけと思って、 compoerを叩いてみると、


the requested PHP extension intl is missing from your system.

とエラーが表示されたのでintlをインストール

XcodeのCommand Line Toolsをインストール


xcode-select --install

PEARをインストール


cd /usr/lib/php
sudo php install-pear-nozlib.phar

intlをインストール


brew install icu4c
sudo pecl install intl
ICU libraries and headers path is: /usr/local/opt/icu4c/

php.iniを編集


vi /etc/php.ini
extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so