LoginSignup
0
0

More than 5 years have passed since last update.

CakePHPの環境をMac上にcomposerで作る(リンク中心)

Posted at

ちょっと必要に迫られたので。
CakePHPは3系のほうがいいのだろうけれども。

Composerでインストール

あまり詳しくないので下記などを感謝しつつつまみ読みしながら。
http://qiita.com/youukkari/items/806e506ad3925bd91881

composer.json はどうやらvendorディレクトリの指定などが必要そうだったので下記のようになった。また、バージョンをいくつか新しいものに変えた。
そうしないと途中で「あれ?Vendorってどれ?」みたいになる。他の情報を参照するとこう書いている人が多かったのでベストプラクティス的な何か?(詳しい人おしえて)

あとプラグインはとりあえず入れたけれどあとで調べてみようと思う。

{
  "extra": {
    "installer-paths": {
      "app/Plugin/Migrations": ["cakedc/migrations"],
      "app/Plugin/Users": ["cakedc/users"],
      "app/Plugin/Search": ["cakedc/search"],
      "app/Plugin/Utils": ["cakedc/utils"],
      "app/Plugin/Datasources": ["cakephp/datasources"],
      "app/Plugin/DebugKit": ["cakephp/debug_kit"],
      "app/Plugin/BoostCake": ["slywalker/boost_cake"],
      "app/Plugin/aws-sdk-php": ["aws/aws-sdk-php"]
    }
  },
  "require" : {
    "php": ">=5.2",
    "ext-mcrypt": "*",
    "cakedc/migrations": "2.3.*",
    "cakedc/users": "2.0.*",
    "cakedc/search": "2.2.*",
    "cakedc/utils": "1.4.*",
    "cakephp/datasources": "2.3.x-dev",
    "cakephp/cakephp" : "2.6.*",
    "slywalker/boost_cake": "dev-master",
    "aws/aws-sdk-php": "2.*"
  },
  "config": {
        "vendor-dir": "Vendor/"
  },
  "require-dev": {
    "phpunit/phpunit": "4.6.*"
  }
}

Migration は 下記のように真似してみたらあっさりできた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0