1
1

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のPHPパスを変更する

Posted at

PHPアプリケーションを開発する際に、Composerで使用するPHPバージョンを変更したい場合があります。
composerコマンドは環境変数Pathに設定されているものを使うので、実行対象のPHPのパスを変更する必要があります。

1.composer.batを検索します。

where composer.bat

2.プロジェクトフォルダへコピーする
3.コピー先のcomposer.batを下記のように編集する

@ECHO OFF
php “%~dp0composer.phar” %*

@ECHO OFF
【設定対象としたいPHPの絶対パス】 “%~dp0composer.phar” %*

4.コピー先のcomposer.batを実行する

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?