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

Clean install requires php8.1, but installs latest php version #642

Open
mischabraam opened this issue Dec 9, 2024 · 0 comments
Open

Clean install requires php8.1, but installs latest php version #642

mischabraam opened this issue Dec 9, 2024 · 0 comments

Comments

@mischabraam
Copy link
Member

According to the documentation of Valet+, php8.1 is required for installation. So first we need to install php8.1 with brew install [email protected] before installing the Valet+ services with valet-plus install. The install command uses the same command of Laravel's valet "under the hood". This laravel valet install command, by default, installs php using Brew, which is the latest version of php (currently 8.4).

The result is two running php versions after completion of the valet-plus install command. Which leads to numerous issues. Like the following.

mischabraam@WP-LT-20 valet-plus % valet-plus elasticsearch use opensearch2
Password:
PHP Deprecated:  {closure:/Users/mischabraam/Development/Tools/valet-plus/cli/valet.php:293}(): Implicitly marking parameter $mode as nullable is deprecated, the explicit nullable type must be used instead in /Users/mischabraam/Development/Tools/valet-plus/cli/valet.php on line 293

brew services ls shows the two running php versions.

mischabraam@WP-LT-20 valet-plus % brew services ls
Name    Status  User File
dnsmasq none    root
mailhog none    root
nginx   started root ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
php     none    root
[email protected] started root ~/Library/LaunchAgents/[email protected]

Work around is to manually stop the latest version of php and link php8.1 with the following commands.

sudo brew services stop php
brew link --overwrite [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant