LoginSignup
48
46

More than 5 years have passed since last update.

composer 経由で github からインストールする方法

Last updated at Posted at 2014-06-19

こういうのも記事にしておかないと忘れる

関連記事:

ヾ(・ω<)ノ" 三三三● ⅱⅲ コロコロ♪

------------------- ↓ 余談はここから ↓-------------------

PHPUnitがPEARから離脱するなど、
PHPのパッケージ管理はPEARからcomposerに移ったといっても過言ではない。

ただ、オリジナルではなくforkした別のものを使いたい時など、
Packagistに登録されていないものを使おうとすると、
ちょっと困ったことになる。

そこで調べてみるとちゃんとあったので今回はそれを掲載。

------------------- ↑ 余談はここまで ↑-------------------

ヾ(・ω<)ノ" 三三三● ⅱⅲ コロコロ♪

------------------- ↓ 本題はここから ↓-------------------

ローカルでの名称を'wouterj/behat'として、
BehatのforkであるWouterJ/Behatをインストールしようとしている。
'formatter_junit_1'ブランチをダウンロードする場合、
composer.jsonは以下のようになる

composer.json
・・・
    "repositories": [
     {
      "type":"package",
        "package": {
          "name": "wouterj/behat",
          "version":"master",
          "source": {       
            "url": "https://github.com/WouterJ/Behat.git",
            "type": "git",
            "reference":"formatter_junit_1"
          }
        }
      }
    ],
    "require": {
        "wouterj/behat": "*"
    },
・・・
48
46
1

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
48
46