http://book.cakephp.org/3.0/en/installation.html
1.コンポーザやってみると。
composer create-project -s dev cakephp/app
以下のエラーが。
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.
Installing cakephp/app (dev-master d15c9b13b6088a4bf3d52a3342fbce878a6cc3a5)
- Installing cakephp/app (dev-master master)
Cloning master
Created project in /Users/araky/git/test03/app
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for cakephp/cakephp 3.0.*-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
2.intlをダウンロード
http://pecl.php.net/package/intlgunzip intl-3.0.0.tgz tar xvf intl-3.0.0.tar
3.phpize
/Applications/XAMPP/bin/phpize
4.configure
./configure --with-php-config=/Applications/XAMPP/bin/php-config-5.5.9
こんなエラーが。。。
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
5.icuをinstall
brew install icu4c
6.もう一度configure
./configure --with-php-config=/Applications/XAMPP/bin/php-config-5.5.9 --with-icu-dir=/usr/local/Cellar/icu4c/52.1
7.sudo make
8.sudo make test
なんかFailでてるけどいいや。
===================================================================== TEST RESULT SUMMARY --------------------------------------------------------------------- Exts skipped : 0 Exts tested : 59 --------------------------------------------------------------------- Number of tests : 388 357 Tests skipped : 31 ( 8.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 22 ( 5.7%) ( 6.2%) Expected fail : 0 ( 0.0%) ( 0.0%) Tests passed : 335 ( 86.3%) ( 93.8%) --------------------------------------------------------------------- Time taken : 36 seconds ===================================================================== ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- Bug #58756: w.r.t MessageFormatter [tests/bug58756_MessageFormatter.phpt] IntlCalendar::getDayOfWeekType() basic test [tests/calendar_getDayOfWeekType_basic.phpt] asort() [tests/collator_asort.phpt] compare() [tests/collator_compare.phpt] get_locale() icu >= 4.8 [tests/collator_get_locale2.phpt] collator_get_sort_key() [tests/collator_get_sort_key.phpt] sort() [tests/collator_sort.phpt] sort_with_sort_keys() [tests/collator_sort_with_sort_keys.phpt] IntlDateFormatter: several forms of the calendar arg [tests/dateformat_create_cal_arg.phpt] IntlDateFormatter::formatObject(): IntlCalendar tests [tests/dateformat_formatObject_calendar.phpt] IntlDateFormatter::formatObject(): DateTime tests [tests/dateformat_formatObject_datetime.phpt] datefmt_format_code() (5.3+, ICU >= 50) [tests/dateformat_format_50+.phpt] datefmt_format_code() and datefmt_parse_code() (ICU >= 50) [tests/dateformat_format_parse_50+.phpt] IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject() [tests/dateformat_get_set_calendar.phpt] IntlDateFormatter: get/setTimeZone() [tests/dateformat_get_set_timezone.phpt] IntlDateFormatter: several forms of the timezone arg [tests/dateformat_timezone_arg_variations.phpt] numfmt_format() icu >= 4.8 [tests/formatter_format2.phpt] locale_get_display_name() ICU >= 50 [tests/locale_get_display_name_50+.phpt] locale_get_display_script() icu >= 49 [tests/locale_get_display_script3.phpt] MessageFormat accepts IntlCalendar args [tests/msgfmt_format_intlcalendar.phpt] msgfmt_parse() tests [tests/msgfmt_parse.phpt] IntlTimeZone::getDisplayName(): type parameter (ICU >= 49) [tests/timezone_getDisplayName_variant2-49+.phpt] =====================================================================
9.sudo make install
10.php.ini編集
extension=intl.so
11.改めて
composer create-project -s dev cakephp/app
12. Cake のserver起動。Railsっぽい。
Console/cake server -p 9999
※localhostが衝突したのでport指定した。
とりあえず、起動しました。あとはデータベースの設定