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 5 years have passed since last update.

laravelで自作ライブラリをgithubからインストールする

0
Posted at

composer.json編集

インストールする側のcomposer.jsonを編集します。

"require": {
     "php": "^7.1.3",
     "hoge/test": "dev-master"
 },
"repositories": [
  {
    "type": "vcs",
    "url": "https://github.com/hoge/test.git"
  }
],

composer update実行

composer update hoge/test.git
をすると、githubのaccesstokenエラーが最初に出ると思うので、以下記事を参考にして設定してみてください。
https://qiita.com/ma_me/items/7d1823c27d6ef45cdf9f

他にも自分は以下エラーが出たのですが、ライブラリ側のcompser.jsonのnameが設定されていないことが原因でした。

Problem 1
    - The requested package hoge/test could not be found in any version, there may be a typo in the package name.
"name": "hoge/test",

nameを設定してあげたら上手く行きました。

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?