Skip to content

Migration from Valet Plus 2.x

Toan Nguyen edited this page Apr 16, 2024 · 11 revisions

This documentation is required for any user currently using Valet+ 2.x.

Let's taste the recipes, the sequence of following commands need to be followed

brew update
sudo chown -Rf "$USER":admin $(brew --prefix)/Cellar/
brew cleanup --prune=all

brew uninstall --ignore-dependencies libyaml

valet uninstall

# if services is hanging/stuck during uninstallation
# manually stop the service with brew services stop <service_name>
# see screenshot below

composer global remove weprovide/valet-plus

brew uninstall --force php php@7.4 php@8.1 php@8.2 yaml@7.4 yaml@8.1 yaml@8.2 yaml@8.3 xdebug@7.4 xdebug@8.1 apcu@7.4 apcu@8.1 apcu@8.2 apcu@8.3 composer redis opensearch opensearch@1 elasticsearch-full mailhog

rm -rf /opt/homebrew/etc/php
rm -rf /opt/homebrew/etc/opensearch
rm -rf /opt/homebrew/etc/elasticsearch
rm -rf /opt/homebrew/etc/redis*.conf

# Install PHP
brew tap shivammathur/php
brew install shivammathur/php/php@8.1
brew link php@8.1 --force

# Install Composer
curl -L https://getcomposer.org/installer > composer-setup.php
php composer-setup.php
mv composer.phar $(brew --prefix)/bin/composer
php composer-setup.php --1
mv composer.phar $(brew --prefix)/bin/composer-v1
php -r "unlink('composer-setup.php');"

# reload the shell with omz reload if using oh-my-zsh or source ~/.zshrc

# Install Valet Pro Max
composer global require nntoan/valet-pro-max:1.x-dev
valet-pro install

# For more information and other installation options, check this documentation: 
# https://github.com/nntoan/valet-pro-max/wiki/Installation

ℹ️ Stop service(s) manually if it's stuck during valet uninstall.

Screenshot below demonstrate how we handle it

Screen Shot 2024-04-16 at 09 16 46

Clone this wiki locally