[Feature request] Manage PHP CLI version per site #374
Replies: 4 comments
-
This would be awesome. I know that PHP Monitor ships with some helper scripts (https://github.com/nicoverbruggen/phpmon/wiki/PHP-Monitor-helper-binaries) which allow you to run |
Beta Was this translation helpful? Give feedback.
-
My suggestion would be that the php binary itself interrogates Herd to check if the current directory belongs to a site maanged by it. If it is, the php binary should "redirect" to the appropriate PHP version that's configured for that site, otherwise, just execute the global php version set in Herd. Kinda like how nvm manages Node versions per directory. |
Beta Was this translation helpful? Give feedback.
-
Was CLI PHP per site ever implemented in Herd? |
Beta Was this translation helpful? Give feedback.
-
I run alias php='herd php'
alias composer='herd composer' |
Beta Was this translation helpful? Give feedback.
-
Feature Description
I maintain projects ranging from 7.4 to 8.2.
I really like using Herd, but it get's a bit tiring having to manually switch the default PHP version when using the CLI for updating dependencies etc.
It would be an amazing feature if the Herd PHP binary was able to automatically switch to the correct PHP version per site, respecting the version that's selected in the UI for the CLI as well.
Is this feature valuable for other users as well and why?
I definetly think this is valuable for people that maintain projects that span multiple PHP versions.
Beta Was this translation helpful? Give feedback.
All reactions