The issue was that whilst box: laravel/homestead-7
was set correctly in Homestead.yaml
, the composer dependency for laravel/homestead
was still using the php-5 version. This meant that the provisioning scripts for Vagrant in vendor/laravel/homestead
were those for php-5 and not php-7.
That can be fixed by using a specific branch of laravel/homestead
for the composer dependency.
In composer.json
, add a custom repository for laravel/homestead
:
"repositories": [
{
"type": "git",
"url": "https://github.com/laravel/homestead"
}
]
And require the php-7
branch specifically for laravel/homestead
:
"require-dev": {
"laravel/homestead": "dev-php-7"
}
Then composer update
and re-provisioning the Vagrant box will fix the issue.
UPDATE
laravel/homestead
now has PHP 7.0 by default, and the old php-7
branch no longer exists. To resolve this issue, you simply need to update to the latest version of laravel/homestead
via composer.json
.