IntelliJ에서 신속하게 CakePHP 환경 구축

16308 단어 PHPCakePHP
【참고】
IntelliJ로 신속하게 PHP 개발 환경 구축

↑ 기사에서 PHP의 환경 자체는 거의 OK.

하고 말하면 Mac의 디폴트 PHP의 버전을 올릴 때에 조금 빠졌다. . .

PHP 버전 업에서 빠졌습니다.



이만큼 두드리면 좋다고 생각하면
brew update
brew install php56

우치
Error: No available formula with the name "php56" 
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
These formulae were found in taps:
homebrew/php/php56-amqp            homebrew/php/php56-ioncubeloader   homebrew/php/php56-pdo-dblib       homebrew/php/php56-swoole        
homebrew/php/php56-apcu            homebrew/php/php56-jsmin           homebrew/php/php56-pdo-pgsql       homebrew/php/php56-symfony-debug 
homebrew/php/php56-augmentedtypes  homebrew/php/php56-judy            homebrew/php/php56-phalcon         homebrew/php/php56-thrift        
homebrew/php/php56-binpack         homebrew/php/php56-kafka           homebrew/php/php56-pimple          homebrew/php/php56-tidy          
homebrew/php/php56-blitz           homebrew/php/php56-leveldb         homebrew/php/php56-pinba           homebrew/php/php56-timecop       
homebrew/php/php56-boxwood         homebrew/php/php56-libevent        homebrew/php/php56-proctitle       homebrew/php/php56-timezonedb    
homebrew/php/php56-chdb            homebrew/php/php56-libsodium       homebrew/php/php56-propro          homebrew/php/php56-twig          
homebrew/php/php56-couchbase       homebrew/php/php56-libvirt         homebrew/php/php56-protobuf        homebrew/php/php56-uopz          
homebrew/php/php56-crypto          homebrew/php/php56-lz4             homebrew/php/php56-pspell          homebrew/php/php56-uploadprogress
homebrew/php/php56-dbase           homebrew/php/php56-lzf             homebrew/php/php56-pthreads        homebrew/php/php56-uuid          
homebrew/php/php56-dbus            homebrew/php/php56-magickwand      homebrew/php/php56-qr              homebrew/php/php56-v8js          
homebrew/php/php56-dmtx            homebrew/php/php56-mailparse       homebrew/php/php56-raphf           homebrew/php/php56-varnish       
homebrew/php/php56-eio             homebrew/php/php56-maxminddb       homebrew/php/php56-rdkafka         homebrew/php/php56-vld           
homebrew/php/php56-ev              homebrew/php/php56-mcrypt          homebrew/php/php56-redis           homebrew/php/php56-wbxml         
homebrew/php/php56-event           homebrew/php/php56-mecab           homebrew/php/php56-redland         homebrew/php/php56-xcache        
homebrew/php/php56-fast_assert     homebrew/php/php56-memcache        homebrew/php/php56-riak            homebrew/php/php56-xdebug        
homebrew/php/php56-gearman         homebrew/php/php56-memcached       homebrew/php/php56-runkit          homebrew/php/php56-xhgui         
homebrew/php/php56-geoip           homebrew/php/php56-meminfo         homebrew/php/php56-scrypt          homebrew/php/php56-xhprof        
homebrew/php/php56-gmagick         homebrew/php/php56-midgard2        homebrew/php/php56-snappy          homebrew/php/php56-xmldiff       
homebrew/php/php56-gmp             homebrew/php/php56-mongo           homebrew/php/php56-snmp            homebrew/php/php56-xxtea         
homebrew/php/php56-gnupg           homebrew/php/php56-mongodb         homebrew/php/php56-sodium          homebrew/php/php56-yac           
homebrew/php/php56-graphdat        homebrew/php/php56-mosquitto       homebrew/php/php56-solr            homebrew/php/php56-yaf           
homebrew/php/php56-grpc            homebrew/php/php56-msgpack         homebrew/php/php56-sphinx          homebrew/php/php56-yaml          
homebrew/php/php56-hprose          homebrew/php/php56-mustache        homebrew/php/php56-spl-types       homebrew/php/php56-yar           
homebrew/php/php56-htscanner       homebrew/php/php56-mysqlnd_ms      homebrew/php/php56-ssh2            homebrew/php/php56-yaz           
homebrew/php/php56-http            homebrew/php/php56-oauth           homebrew/php/php56-stats           homebrew/php/php56-yp            
homebrew/php/php56-httpparser      homebrew/php/php56-opcache         homebrew/php/php56-stemmer         homebrew/php/php56-yrmcds        
homebrew/php/php56-igbinary        homebrew/php/php56-parsekit        homebrew/php/php56-suhosin         homebrew/php/php56-zmq           
homebrew/php/php56-imagick         homebrew/php/php56-pcntl           homebrew/php/php56-sundown         homebrew/php/php56-zookeeper     
homebrew/php/php56-intl            homebrew/php/php56-pdflib          homebrew/php/php56-svm             homebrew/php/php56               
To install one of them, run (for example):
  brew install homebrew/php/php56-amqp

조사해 보니 있었다.
mac에 homebrew로 PHP5.6 환경을 설치해보십시오.

리포지토리를 만들어야 할 것 같습니다.
brew tap homebrew/php
brew tap homebrew/dupes

칸막이 다시 ...
brew install php56
php -v

제대로 5.6에
PHP 5.6.23 (cli) (built: Jun 24 2016 21:14:33) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

이것을 기다리고 있었어.
그리고는 넣은 패스를 지정해 Interpreter를 5.6에.


Cake를 넣을거야.



【참고】
OS X에서 PhpStorm에서 Composer를 사용하여 CakePHP 2.5를 넣은 후 테스트
Composer를 이용한 CakePHP2.4.x 도입 절차

프로젝트 만들면 마침내 Cake를 넣는다.
PHP의 패키지 관리 툴인 composer를 넣어 사용해 본다.
brew install composer

작성한 프로젝트 바로 아래에 composer.json를 작성하여 필요한 모듈(이라고 부르는가?)을 정의하여 설치.

composer.json
{
  "name": "hello-cake",
  "repositories": [
    {
      "type": "pear",
      "url": "http://pear.cakephp.org"
    }
  ],
  "require": {
    "cakephp/cakephp": "3.2.9"
  },
  "require-dev": {
    "phpunit/phpunit": "5.4.*",
    "cakephp/debug_kit": "3.2.9"
  },
  "config": {
    "vendor-dir": "Vendor/"
  }
}
php composer.phar install

도하
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package pear-cakephp/cakephp could not be found in any version, there may be a typo in the package name.
  Problem 2
    - cakephp/debug_kit 3.2.0 requires cakephp/cakephp 3.1.* -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9].
    - cakephp/debug_kit 3.2.1 requires cakephp/cakephp 3.1.* -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9].
    - cakephp/debug_kit 3.2.2 requires cakephp/cakephp 3.1.* -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9].
    - cakephp/debug_kit 3.2.3 requires cakephp/cakephp >=3.1.0 -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.2.0, 3.2.1, 3.2.10, 3.2.11, 3.2.12, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9].
    - cakephp/debug_kit 3.2.4 requires cakephp/cakephp >=3.1.0 <4.0 -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.2.0, 3.2.1, 3.2.10, 3.2.11, 3.2.12, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9].
    - cakephp/debug_kit 3.2.5 requires cakephp/cakephp >=3.1.0 <4.0 -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.2.0, 3.2.1, 3.2.10, 3.2.11, 3.2.12, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9].
    - cakephp/debug_kit 3.2.6 requires cakephp/cakephp >=3.1.0 <4.0 -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.2.0, 3.2.1, 3.2.10, 3.2.11, 3.2.12, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9].
    - cakephp/debug_kit 3.2.7 requires cakephp/cakephp >=3.1.0 <4.0 -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.2.0, 3.2.1, 3.2.10, 3.2.11, 3.2.12, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9].
    - cakephp/debug_kit 3.2.8 requires cakephp/cakephp >=3.1.0 <4.0 -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.2.0, 3.2.1, 3.2.10, 3.2.11, 3.2.12, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9].
    - cakephp/debug_kit 3.2.9 requires cakephp/cakephp >=3.1.0 <4.0 -> satisfiable by cakephp/cakephp[3.1.0, 3.1.1, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.2.0, 3.2.1, 3.2.10, 3.2.11, 3.2.12, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9].
    - cakephp/cakephp 3.2.9 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.8 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.7 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.6 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.5 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.12 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.11 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.10 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.2.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.9 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.8 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.7 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.6 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.5 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.13 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.12 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.11 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.10 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - Installation request for cakephp/debug_kit 3.2.* -> satisfiable by cakephp/debug_kit[3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  To enable extensions, verify that they are enabled in those .ini files:
    - /usr/local/etc/php/5.6/php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

어쩌면 the requested PHP extension intl is missing from your system 가 간인 것 같다. php-intl 되는 확장 기능이 있어, 그 녀석을 넣어라, 라고 하는 것과 같은 것이므로 넣고 분할한다. 이번이야말로
brew install php56-intl
composer install

예.



cake 프로젝트 만들기!!!!
php composer.phar create-project --prefer-dist -s dev cakephp/app hello-cake

cake server에서 테스트 페이지가 시작됩니다.
hello-cake/bin/cake server

좋은 웹페이지 즐겨찾기