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

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
5
Help us understand the problem. What is going on with this article?
@shosho

Homestead の PHPバージョンを変更する方法

More than 1 year has passed since last update.

以下のように Homestead.yml にphpのバージョンを追記するだけ

Homestead.yml
sites:
    - map: homestead.test
      to: /home/vagrant/project1/public
      php: "7.3"

注意

これだけだとバージョンは上がっても、CLIのバージョンはデフォルトのままになってます。
php -v としても思っていたのと違うPHPのバージョンが表示される)

設定したバージョンに合致する以下のコマンドを実行して、CLIのバージョンも変更しましょう。

php56
php70
php71
php72
php73
php74

参考記事

https://laravel.com/docs/6.x/homestead#multiple-php-versions (公式ドキュメント)
https://takuyafujita.hatenablog.com/entry/2019/03/29/234813
https://www.84kure.com/blog/2019/09/03/laravel-homestead%E3%81%A7php%E3%81%AE%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%82%92%E5%88%87%E3%82%8A%E6%9B%BF%E3%81%88%E3%82%8B/

5
Help us understand the problem. What is going on with this article?
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
shosho
Qiitaには忘れそうなこと、勉強したことをメモしてます。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
5
Help us understand the problem. What is going on with this article?