Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Will you support valet 3? #361

Open
timvanuum opened this issue Mar 30, 2022 · 7 comments
Open

Question: Will you support valet 3? #361

timvanuum opened this issue Mar 30, 2022 · 7 comments
Assignees

Comments

@timvanuum
Copy link

No rush, but just the question if you are going to support valet 3.
https://laravel-news.com/laravel-valet-3-0-0

Thanks for the work so far! :)

@jmarcher
Copy link
Collaborator

Not right now, I think this will need a lot of work or even a re-base from origin in order to get the same results.

Many package managers do not support PHP Multi-version as per default. Homebrew may be an option but it does not seem to work for everyone as expected.

@jmarcher jmarcher self-assigned this Mar 30, 2022
@sergix44
Copy link

sergix44 commented Mar 31, 2022

Not right now, I think this will need a lot of work or even a re-base from origin in order to get the same results.

Many package managers do not support PHP Multi-version as per default. Homebrew may be an option but it does not seem to work for everyone as expected.

On debian based distros there is the sury repo that contains multiple versions of php, nginx, etc. Also there is a PPA still from sury. https://deb.sury.org https://launchpad.net/~ondrej/+archive/ubuntu/php/

For fedora and arch + derivates i don't know really.

I'm on an ubuntu based distro with that repos, and now i switch with the use command the php version.

@hakimzulkufli
Copy link

Many package managers do not support PHP Multi-version as per default. Homebrew may be an option but it does not seem to work for everyone as expected.

Would something like something like phpenv be better than catering to individual distros package managers?

As of now, I have switched (almost) completely to using only phpenv + php-build (via phpenv-installer) to manage my php installations. I am running on Arch. While Arch does have multiple versions vie the official repository and AUR, managing multiple php versions using phpenv is a lot easier.

https://github.com/phpenv/phpenv
https://github.com/php-build/php-build
https://github.com/phpenv/phpenv-installer

@Adesin-fr
Copy link
Collaborator

Adesin-fr commented Jul 26, 2022

I was reading at laravel valet's isolate function (which allows to run php-fpm multiple versions).
At first , it doesn't seems too hard to implement: just generate a nginx conf file for isolated site, which is using a socket instead of a port bind to php-fpm.

Haven't looked too far in you valet implementation, but just seen that you need to implement all distros package manager as wrappers (MacOs only use brew version).

Just a quick idea : would it be possible to use brew on linux instead of native package manager ? It did not had any look, either don't know if it would allow to update nginx/dnsmasq configuration, etc...
I might fire a VM and give it a try !
Edit : Just installed a brand new Ubuntu VM, installed brew inside it, then PHP, then composer, then ran "composer global require laravel/valet". Got a first error telling me "php not found"... Made a symlink from brew's php version to /usr/bin/php , ran again, then "Only Mac is supported...."... So to go a bit further, I must first clone the original repo, then remove this test.... but I'm 99.99% sure I'll run into issues about running dnsmasq or other...

@the-programmer-alex
Copy link

I was reading at laravel valet's isolate function (which allows to run php-fpm multiple versions). At first , it doesn't seems too hard to implement: just generate a nginx conf file for isolated site, which is using a socket instead of a port bind to php-fpm.

Haven't looked too far in you valet implementation, but just seen that you need to implement all distros package manager as wrappers (MacOs only use brew version).

Just a quick idea : would it be possible to use brew on linux instead of native package manager ? It did not had any look, either don't know if it would allow to update nginx/dnsmasq configuration, etc... I might fire a VM and give it a try ! Edit : Just installed a brand new Ubuntu VM, installed brew inside it, then PHP, then composer, then ran "composer global require laravel/valet". Got a first error telling me "php not found"... Made a symlink from brew's php version to /usr/bin/php , ran again, then "Only Mac is supported...."... So to go a bit further, I must first clone the original repo, then remove this test.... but I'm 99.99% sure I'll run into issues about running dnsmasq or other...

It's a known issue that linux-homebrew php doesn't work with linux-valet. Only solution is to install php via apt-get.

@Adesin-fr
Copy link
Collaborator

Adesin-fr commented Dec 6, 2022

Hi there !

I've merge a first "draft" of valet's 3 "isolate" function into master branch.

If some of you can help me to test and find bugs ;)

Please feel free to comment !

PS : a small update : I've just fixed it right now, it was pretty broken !
PS2 : A note about "secure" command : like Laravel's valet 3, secure and isolate are not compatible together. I should make a small change to allow both to work together...

@joke2k
Copy link

joke2k commented Dec 6, 2022

@Adesin-fr please check #401 because the master wont work with links isolation now ;D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants