Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
15
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

PhpStormでcomposerを使う

PhpStormのPHP Composer設定

PhpStorm PreferenceのComposerで「Path to composer.phar」にcomposerのパスを設定します。

% which composer
/usr/local/bin/composer

本PCは/usr/local/bin/composerにcomposerをインストールしているので次のようになります。

設定画面

kobito.1408894445.124909.png

composer.jsonの作成

メニューの「Tools - Composer - Init Composer...」でプロジェクトのルートにcomposer.jsonのひな形が作成されます。

kobito.1408894749.341102.png

パッケージの追加

メニューの「Tools - Composer - Add Dependency...」

kobito.1408895042.415228.png

パッケージとバージョンを選んでInstallボタンを押すとcomposer.jsonにパッケージが追加され、かつcomposer updateも実行されてダウンロードが始まります。
PhpStormの多機能っぷりがすごい。

kobito.1408895217.302661.png

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
15
Help us understand the problem. What are the problem?