At some point. This was working fine. I've put off asking for help since it's on the PHP 8 which is what I use for a work project, however I want to use PHP 8.1 for side projects. Now that we have Codecourse forum, it's time I vent!
No matter what I do, Valet does not want to switch PHP versions to 8.1. I'm not actually sure if it's Homebrew reporting the wrong version but, I've tried literally everything. Here's what I have read and tried:
I expect it to report the correct PHP version, or at least act like it.
If I go through the whole process of deleting PHP, Valet and Homebrew, I can get back to PHP 8.1 but once I switch. I get the same issue. Any ideas? To make things interesting... The best answer gets a free yearly subscription (or a 1 year extension) for Codecourse. It can also be gifted to someone else.
I just downloaded PHPMonitor (phpmon) and it actually shows I am running PHP 8.1 although
php -v says otherwise. I still have the issue where Composer doesn't know about the change either.
I have fixed the issue. There were a bunch of export for PHP versions and one for PATH in my .zshrc aliases file. Removing this resolved the error.
@alex Because Codecourse, you and I (yes, me too) are awesome, I'm giving away a yearly subscription for Codecourse.