Replies: 6 comments
-
As discuss on twitter we definitly need that feature to fully isolate our projects. I’m sure many people will try to run artisan or composer command without thinking to change the global php version before. Hope this idea will be accepted! If i can help you to develop that, I will for sure. |
Beta Was this translation helpful? Give feedback.
-
I've been trying to solve this same issue. I kinda have a I know the Valet team will release something officially. In but meantime, if anyone is interested Please give my solution a try. This is very early, feedbacks are welcome! https://github.com/NasirNobin/zsh-valet Here's a quick video demonstrationCleanShot.2022-03-15.at.13.32.49.mp4 |
Beta Was this translation helpful? Give feedback.
-
I left a comment about this yesterday too. Forge has |
Beta Was this translation helpful? Give feedback.
-
I like this idea and I'm more than happy to welcome a pull request. In the meantime, I'll make plans to work on it eventually but don't have an immediate timeline. I think the idea of |
Beta Was this translation helpful? Give feedback.
-
Submitted a PR by adding this functionality here #1216 🙌 |
Beta Was this translation helpful? Give feedback.
-
For anyone using WordPress and WP CLI with valet, this worked for me to make sure WP CLI uses the right PHP version (in this example, to use the
May need to be updated with whatever the path is to your wp binary, and ripe for setting up as a command line shell alias. |
Beta Was this translation helpful? Give feedback.
-
I've proposed on twitter an idea on how to improve the valet isolation feature for php cli commands. Changing the global php version to the one from the current valet is problematic if you are working on multiple valet sites in parallel with different versions. You would have to permanently change the global php version.
How about a new command like
valet run [args]
which is using the php version of the current valet site (the cli is within) to run the command? A call likevalet run composer update
will work like this:So instead of constantly changing the global php version when working on multiple projects in parallel, the
valet run
command will use the valet information about the current directory to run commands. No more use ofvalet use
is ever needed!Beta Was this translation helpful? Give feedback.
All reactions