phpmon works well with valet for switching php versions
PHP 7.4 on Laravel Valet 3.1
I've setup local dev environment on Laravel Valet 3.1. Ideally I would like to have two versions of PHP - 7.4 and 8.1, where 7.4 would be the default. I am just somewhat confused about some points, can someone please clarify if I am not doing something wrong?
-
Is there currently any use for
valet use [email protected]and similar? Valet 3.1 requires PHP 8.1, which imo is latest. So if I use this command, it downgrades PHP to 7.4, but thenvalet use [email protected]or pretty much any valet command crashes on error about requires PHP version. My only way is tobrew unlink [email protected]andbrew link [email protected]to get valet back working. -
So from the above, it looks like currently only way to have valet working properly is to have [email protected] as default, older version cannot be default, is that correct?
-
Having [email protected] as default, I have set [email protected] to some sites using
isolatecommand. Unfortunately that requires to always prefix php commands withvalet, eg.valet php artisan make:model. It's good that there is this way, but it is somewhat tedious to do always. Also for running PHPUnit tests I have to do something likevalet php ./vendor/bin/phpunit. Is there any better way to perhaps aliasphpcommand tovalet phpfor the sites which are isolated, or any walkaround that would make it more convenient?
Thanks so much
Please or to participate in this conversation.