How to change on Vagrant from PHP 7.2 to PHP 7.3?

Viewed 3839

I try to install Laravel 8 to vagrant. The install process works without problem. But the homepage shows the following error:

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.2.34-8+ubuntu18.04.1+deb.sury.org+1. in /home/vagrant/code/7time/vendor/composer/platform_check.php on line 24

When I check the version, it shows 7.3

vagrant@homestead:~/code$ php -version
PHP 7.3.24-3+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Oct 31 2020 16:59:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.24-3+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

I tried these things:

  • I searched on Google for solution
  • I reinstalled PHP
  • I tried to install Laravel via Laravel installer and via Composer

What might be wrong?

1 Answers
Related