¬

Our Blog

Upgrade PHP on Laravel Valet

Original - Feb 28, 2020 -1 Minute Read
Upgrade PHP on Laravel Valet

At some point you will probably need to upgrade your version of PHP in your Laravel Valet environment. This guide should help you out.

The first step in the upgrade process is to upgrade your homebrew php instance

First update homebrew

brew update

Next upgrade your version of php

brew update php

Next update your global composer instance

composer global update

Install Valet

valet install

Finally tell Valet to use your new version of php. At the time of writing this, we're using PHP 7.4

brew use php@7.4

That's it. Your version of php on Laravel Valet should be updated. You can check by typing php -v

PHP 7.2.26 (cli) (built: Dec 18 2019 15:28:10) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.26, Copyright (c) 1999-2018, by Zend Technologies