PHP8.1 バージョンで
composer
コマンドを実行する必要がある場合は、次のようにします。
php8.1 /usr/local/bin/composer update
プロジェクト内で PHP の実行バージョンを指定するには、
homestead.yaml
ファイル内のサイトでPHPバージョンを指定する必要があります。以下のようにします。
- map: homestead.test
to: /home/vagrant/code/Laravel/public
php: "8.1"
homestead.yaml
ファイルを変更した後、そのファイルの設定を再読み込みするには、以下のコマンドを使用します。
vagrant provision && vagrant reload
CLI モード下の PHP バージョンを切り替える場合、次のコマンドを使用します。
sudo update-alternatives --config php
sudo update-alternatives --config phpize
sudo update-alternatives --config php-config
該当する数字を入力してください。
(つづく...)