skip to Main Content

I’ve trying to run a per-project vagrant installation for a laravel 8.2 project I just clonned from the repo, personally I dont like laravel 8, but w/e so my local enviroment is set to run laravel 7 projects, and my local php version is 7.2.22 but for this project, it tells me that composer requires at least php 7.3 version (on my local machine).

The main reason to use vagrant/homestead is that you dont have to affect or change any on your local machine in the first place, right? so if I dont want to upgrade to 7.3 it makes no sense it doesnt allow me to create de virtual machine bc first I have to upgrade it when the point is that I can modify as much I want inside the Virtual machine and not my local…

Any suggestions?

2

Answers


  1. Chosen as BEST ANSWER

    At the end, I was not able to find a way to run vagrant without modifying my local machine, so had to update the php version on my local machine


  2. if you are using Homestead, you can refer the laravel documentation
    https://laravel.com/docs/8.x/homestead#php-versions

    you can always use specific php version per project

    Edit your Homestead.yaml

    Example:

    sites:
        - map: sample1.app
          to: /home/vagrant/code/sample1/public
          php: "7.2"
    
        - map: sample1.app
          to: /home/vagrant/code/sample1/public
          php: "7.24"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search