I installed a year ago Homestead with Laravel 5.5.
Now I want to upgrade to Laravel 5.6.
I upgraded Homestead as explained here with
vagrant box update
git pull origin master
This forced me also to upgrade my vagrant
to 2.1.2
.
Now when I log in with
vagrant ssh
I cannot upgrade to Laravel 5.6, because when I run composer update
I get this warning:
Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.
Problem 1 - This package requires php >=7.1.3 but your PHP version (7.0.27; Package overridden via config.platform (actual: 7.1.7)) does not satisfy that requirement. Problem 2 - laravel/framework v5.6.9 requires php ^7.1.3 -> your PHP version (7.1.7-1+ubuntu16.04.1+deb.sury.org+1) overridden by "config.platform.php" version (7.0.27) does not satisfy that requirement.
If I call php -v
in the vagrant machine I get
PHP 7.1.7-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jul 7 2017 09:41:45) ( NTS )
Which would be okay because Laravel only requires PHP 7.1.3
, but the upgrade gets stucks because composer claims I am using PHP 7.0.27
.
WHy is that and how can I fix it?
I even tried
sudo apt-get update
sudo apt-get upgrade
as suggested here but it still does not work. Some packages have been kept back on the upgrade:
The following packages have been kept back: libdrm-amdgpu1 libdrm2 libegl1-mesa libgbm1 libgd3 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libwayland-egl1-mesa mssql-tools open-vm-tools php7.1-bcmath php7.1-cli php7.1-common php7.1-curl php7.1-dev php7.1-fpm php7.1-gd php7.1-imap php7.1-intl php7.1-json php7.1-mbstring php7.1-mysql php7.1-opcache php7.1-pgsql php7.1-readline php7.1-soap php7.1-sqlite3 php7.1-xml php7.1-zip 0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.