check php version in composer.json
and check version installed on your Mac
php -v in terminal
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi Guys,
Just factory reset my iMac. Reinstalling everything.
My Laravel project is currently running on php version 7.4.9 on localhost. On my live server I'm running php 7.2
How can I change my php version on my localhost to match my live server?
I've used brew to uninstall all version of php and then reinstalled php 7.2. I then installed laravel valet, but my php version on my local laravel project still runs on php 7.4.9
if you have multiple versions of php on your machine, you can tell valet what version to use
valet use php@version
To update project to use the same php v as machine
delete composer.lock update php version in composer.json composer install
Please or to participate in this conversation.