I just update laravel homestead to latest version v10.17.0. Also I update virtual box and vagrant. Related to laravel homestead documentation php 8 should be supported but I wasn't able to setup.
PHP 7.4 is still default version but that is not a problem because I want to use version 8 only for one project and I set php: '8.0' in Homestead.yaml for specific site but there is no impact at all.
I also see there is a function for switching to version 8 in vagrant but I get command not found.
If you change the sites property after provisioning the Homestead virtual machine, you should execute the vagrant reload --provision command in your terminal to update the Nginx configuration on the virtual machine.
In your Homestead folder there is an aliases file. If you've edited this file, back it up. Then delete aliases and run bash init.sh again to regenerate the aliases file. Now vagrant destroy then vagrant up and you should have the php80 alias.
Just jumping in to say that I'm having the same issue as @knubbe and @jigsawiii . It seems like it shouldn't be this difficult....but here I am struggling nonetheless. :-)
Actually, I think I did get it to work. I tried so many things, none of which seemed to help. Then, I realized that I had php: "8.0" under folders instead of under sites. Once I fixed this I ran vagrant reload --provision and all was well.
I'm still not sure that something else wasn't necessary, but I don't really want to take the time right now to wipe everything, start from scratch, and see if that's all that was required. Maybe for another day or another project.
I had the same problem ("realized that I had php: "8.0" under folders instead of under sites"), which fixed it. Should confirm that's all that was required.
This will change php CLI version, but not php FPM version. So, if you run php -v you'll see it's showing version 5.6. However, when you write phpinfo() under your app and run from browser you'll get version 7.3.
https://typhoon-tv.org/