Ask: Remove dot [.] on php version
Basic info
| Distro (Name and version) | PHP Version | Valet version |
|---|---|---|
| Ex: EndeavourOS | multiple | 2.3.2 |
- [x] I've checked the issue queue and could not find anything similar to my bug.
- [x] I'm on the latest version of valet-linux (
valet --version):<Valet-Linux-Version> - [x] I've run
valet fixandvalet installafter updating and before submitting my issue/feature.
What is the problem?
I want to create an isolated site with different php versions. here I have several php versions such as php 7.4 8.2 and 8.0 but when I do the valet isolate 80 command the site in question cannot be accessed.
What was supposed to happen?
the site should be immediately accessible because when you don't isolate the php version there are no problems whatsoever except for the php versioning where there shouldn't be a dot .
What actually happened?
this may be due to a problem when generating valet80.sock because the file cannot be found, according to my observations and the log files that I have seen.
this may be due to writing the version in php,
I use EndeavorOS and install php 8.0 from aur (yay) when I want to run php the version should be php80not php8.0 and the name php fpm should be php80-fpm not php8.0-fpm and because of that when restarting php fpm it definitely doesn't work and it detects that phpx.x-fom isn't installed yet.
How to reproduce this? maybe by fixing writing php version on this Os will fix the problem
What is the solution? I don't know the manual solution when isolating the php version, because this will generate valet80.sock and I haven't been able to do it yet.
but when doing a valet start, I need to do a manual start at first on some required linux packages such as php fpm, nginx, dnsmasq.
as well as restarting the packages when there are changes.
The problem is that depending on the Package Manager the PHP version names may differ, we try to guess the package name here: https://github.com/cpriego/valet-linux/blob/a8d22a4b51b6540fa03da523ca35d10bc4c83b53/cli/Valet/PhpFpm.php#L521
There should be no guessing, but correct format for what you're actually using. It should have proper implementation to have proper version format per package manager, as it will cause a lot more problems in the future.
Not everyone switches between php versions, therefore we need to guess the installed php version for them.
it is not the problem with switching php versions. the issue is that dnf does it in a different way thus needs to handle that separately.