It would be great to provide multiple php version at the same time in a box and specify the php version in the Homestead.yaml like so:
sites:
- map: homestead.app
to: /home/vagrant/www
php: 7.0 <====================
- map: homestead.app
to: /home/vagrant/www
php: 5.6 <====================
How do you think about this idea? 😄
This has been brought up a few times, and ultimately what it comes down to is this becomes a big configuration nightmare on our end.
My suggestion is to use different boxes for each version of PHP you need to support. Check out https://laravel.com/docs/5.4/homestead#old-versions if you want to use PHP 7.0. If you need to use 5.x have a look here: https://laravel-news.com/using-older-versions-of-homestead
if you're okay breaking out of the Laravel ecosystem, Local by Flywheel is pretty good. It is built with Wordpress as its primary target, but works good for most things. You may just miss out on some of the things Homestead installs by default, or your custom aliases.
it would be really cool to have such a functionality,
actually i'm using a script to install ondrej/php and php5.6/7.0/7.1 modules on the homestead vagrant box, it's working well, and i can switch versions easily, but it's not out-of-the-box, and need to be re-executed when creating new homestead instances.
Multiple PHP versions is coming in Homestead 6.0, Settler 3.0
Soonâ„¢
Checking in, this is more useful now that Craft 2.6 uses php7.1 and Craft 3+ uses php7.2
that all good and well but when i make those changes jack squate changes thanks alot
https://laravel.com/docs/5.7/homestead#multiple-php-versions
Most helpful comment
Multiple PHP versions is coming in Homestead 6.0, Settler 3.0
Soonâ„¢