0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

composerでNetCommons3開発用インストール

Last updated at Posted at 2020-08-01

NetCommons3はプラグインがそれぞれ別リポジトリに別れてるので、NetCommons3本体だけgit cloneしても動きません。

そこで、開発用に各プラグインもリリース版でなく最新ソースを取得した状態にしたいので、composerでNetCommons3をインストールしていきます。

(開発用でなくリリース版でOKなら NetCommos3をcomposerでインストール · NetCommons3/NetCommons3 Wiki の手順に従えばOKです)

NetCommons3をgit clone

$ git clone https://github.com/NetCommons3/NetCommons3.git
$ cd NetCommons3

composer.json変更してcomposer install

composer.jsonに "minimum-stability": "dev" を追加します。

scripts のあとあたりに追記します。

composer.json
{
 中略
 "scripts": {
        "post-install-cmd": ["app/Console/cake install.install install_bower"],
        "post-update-cmd": [
            "app/Console/cake install.install install_bower"
         ]
    },
    "minimum-stability": "dev"
}

composer.jsonの編集がおわったらnetcommons/*パッケージをupdateしてからinstall

$ comopser update "netcommons/*"
$ composer install

MAMP用に direnv設定

$ touch .envrc
$ direnv edit .

最初にtouchしてるのはdirenvのエディタにcotエディタを指定してて、ファイルがないとエラーになってしまうので。

.envrc
PATH_add /Applications/MAMP_PHP_BIN/php7.4
PATH_add /Users/ryuji/code/NetCommons3/app/Console

MAMPアップデートするとPHPのマイナーバージョンが変わってパスも変わってしまうので、シンボリックリンクつくってそっちにパス通すようにしてるので上記のようなPATH_addになってます。
MAMPアップデートしたら下記の様なコマンドでシンボリックリンクはってます。

$ ln -s /Applications/MAMP/bin/php/php7.4.2/bin/php php7.4/php

NetCommons3 インストール

$ cd NetCommons3
$ cake install.install
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?