brew-php-switcher icon indicating copy to clipboard operation
brew-php-switcher copied to clipboard

Ports to Linux?

Open daemionfox opened this issue 5 years ago • 3 comments

So this is working beautifully for us with MacOS, but we need it also for Linux. Has someone forked and adapted this for Ubuntu or RHEL yet?

daemionfox avatar Mar 18 '19 19:03 daemionfox

I would love to get this working for both MacOS and Linux as I myself have moved to Ubuntu as my daily driver. Windows as well would also be good so its a complete cross platform utility. I will look into how I would go about doing this but if anyone has any advice from a project they have already done advice would be welcome.

philcook avatar Mar 19 '19 17:03 philcook

A problem with this is that there's no standard way to accomplish this in Linux or Windows. This script helps with those that install php via homebrew, but there's still alternatives. If you're looking for something a little easier to use, for Linux you could look into phpenv (https://www.github.com/phpenv/phpenv). I prefer homebrew php on Mac because I've had issues with compiling before, but on Linux, there's multiple flavors (Debian vs Redhat vs Whatever else (i.e. Gentoo, etc)), and each of these different flavors choose to implement things such as PHP in different ways, and even within that there can be multiple ways it's handled.

ikari7789 avatar Mar 20 '19 08:03 ikari7789

So this is working beautifully for us with MacOS, but we need it also for Linux. Has someone forked and adapted this for Ubuntu or RHEL yet?

i gave porting it a try:

https://github.com/chancegarcia/ubuntu-php-switcher

chancegarcia avatar Feb 11 '21 01:02 chancegarcia