ここにだいたいのことが載っているが、php56でpearを有効にしたいなら、明示的にpearを有効にするoptionをつけないといけない。
2016年3月28日現在だと
$ brew options php56 --with-cgi Enable building of the CGI executable (implies --without-fpm) --with-debug Compile with debugging symbols --with-enchant Build with enchant support --with-gmp Build with gmp support --with-homebrew-apxs Build against apxs in Homebrew prefix --with-homebrew-curl Include Curl support via Homebrew --with-homebrew-libressl Include LibreSSL instead of OpenSSL via Homebrew --with-homebrew-libxml2 Include Libxml2 support via Homebrew --with-homebrew-libxslt Include LibXSLT support via Homebrew --with-imap Include IMAP extension --with-libmysql Include (old-style) libmysql support instead of mysqlnd --with-mssql Include MSSQL-DB support --with-pdo-oci Include Oracle databases (requries ORACLE_HOME be set) --with-pear Build with PEAR --with-phpdbg Enable building of the phpdbg SAPI executable (PHP 5.4 and above) --with-postgresql Build with postgresql support --with-thread-safety Build with thread safety --without-apache Disable building of shared Apache 2.0 Handler module --without-bz2 Build without bz2 support --without-fpm Disable building of the fpm SAPI executable --without-ldap Build without LDAP support --without-legacy-mysql Do not include the deprecated mysql_ functions --without-mysql Remove MySQL/MariaDB support --without-pcntl Build without Process Control support --HEAD Install HEAD version
となっているので、例えば
を参考に args
に with-pear
を追加するといい。
こんな感じ
brew 'homebrew/php/php56', args: ['with-pear']
ただ素直にreinstallしたんでは私の場合うまくpearが有効にならなかったので
https://github.com/Homebrew/homebrew-php#common-upgrade-issues
のissuesとかを見て、依存関係のあるパッケージを全部削除してから brew bundle
しなおした。
無事入った。