It looks like this may have been due to the shell’s path not giving precedence to Local’s version of PHP.
Can you take a look at the shell configuration files (I’m guessing .zshrc since this is the default on new macs) and see if you can adjust things so that Local’s PHP binary is being used?
I think it’s unfortunate to have to rely on path precedence here to use the correct version of PHP. It just seems (is) fragile… but it also seems like it might be necessarily so. The only other thing I can think of would be to alias PHP to the correct version in hopes that would override searching the paths (I haven’t tried this and am not certain that’d work, just an idea I was going to try).
In my case, I definitely don’t need .bash_profile sourced anymore, if ever.
I just had to re-install my OS, don’t ask. But when I reinstalled Local I wasn’t getting the Site Shell version of apps. I discovered that my /opt/homebrew/bin was listed first in the $PATH and moving it to last worked.
I had this order set in my ~/.zshrc profile. Now I’m back to working again.