MacOS Xでcomposerのアップデートをしようとした時、こんなエラーが出て困った。
$composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing sebastian/version (1.0.4)
[RuntimeException]
date_default_timezone_get(): It is not safe to rely on the system's ti
mezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting
this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]
MacOS Xではphp.iniがたくさんあるので、どのphp.iniを使っているのか、調べる必要があります。
$php -i | grep 'Configuration File'
Configuration File (php.ini) Path => /usr/local/etc/php/5.5
Loaded Configuration File => /usr/local/etc/php/5.5/php.ini
こうすると、phpiniがどこにあるか教えてくれる。
$sudo vi /usr/local/etc/php/5.5/php.ini
として、編集してあげればOK。