-
Notifications
You must be signed in to change notification settings - Fork 702
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
Problem installing PHP 7.4 #1407
Comments
It's officially unmaintained/unsupported by homebrew. Does installing it manually bypass the homebrew limitation? brew tap shivammathur/php
brew install shivammathur/php/[email protected] Then run |
That worked! It was necessary to run Previously, the |
Glad you got that working 👍 |
I got it working manually, but the expected automation is not working. Again, this is a fresh installation of Valet on a fresh Mac. Is it worth pursuing a code change to get the automation fully working? Both tapping shivammathur AND installing from it? (Just asking. I'm not a pro at understanding this stuff.) |
Fixes laravel#1407 Homebrew's support policy now aggressively disables older versions earlier than it did previously. That is why we tap the `shivammathur/php` repository. But since Homebrew also now "keeps" those old formulae but marks them as disabled, when Valet runs `brew install [email protected]` it fails because Homebrew just aborts due to its flags in the outdated formula. (They mark it as "disabled" and/or "keg_only :versioned_formula".) To override that we must use `brew install shivammathur/php/[email protected]` internally. Therefore, we need to maintain a list of which PHP Versions we wish to specifically prefix with the `shivammathur/php` tap in order to bypass Homebrew's flags. **ANNUAL MAINTENANCE** 1. This PR adds the array of `LIMITED_PHP_VERSIONS` which we will have to update annually when new PHP versions are retired as others are released. 2. We should also annually update the `LATEST_PHP_VERSION` string.
@joeshelton-wagento do you wanna test this PR #1411 ? You could test it with 7.3 or 8.0 instead of wiping your 7.4 and reinstalling it. |
Apologies. Turns out after some investigation today, only 7.4 is triggering the problematic situation (because of homebrew's formulae contents on today's date), so testing this does actually require uninstalling 7.4 So: It should give you the message that 7.4 is not installed and is being installed from shivammathur/php/[email protected] |
Thanks for testing and posting the details! |
Fixes laravel#1407 Homebrew's support policy now aggressively disables older versions earlier than it did previously. That is why we tap the `shivammathur/php` repository. But since Homebrew also now "keeps" those old formulae but marks them as disabled, when Valet runs `brew install [email protected]` it fails because Homebrew just aborts due to its flags in the outdated formula. (They mark it as "disabled" and/or "keg_only :versioned_formula", but don't actually delete the formula from their repository.) To override that we must use `brew install shivammathur/php/[email protected]` internally. Therefore, we need to maintain a list of which PHP Versions we wish to specifically prefix with the `shivammathur/php` tap in order to bypass Homebrew's flags. **ANNUAL MAINTENANCE** 1. This PR adds the array of `LIMITED_PHP_VERSIONS` which we will have to update annually when new PHP versions are retired as others are released. 2. We should also annually update the `LATEST_PHP_VERSION` string.
Fixes laravel#1407 Homebrew's support policy now aggressively disables older versions earlier than it did previously. That is why we tap the `shivammathur/php` repository. But since Homebrew also now "keeps" those old formulae but marks them as disabled, when Valet runs `brew install [email protected]` it fails because Homebrew just aborts due to its flags in the outdated formula. (They mark it as "disabled" and/or "keg_only :versioned_formula", but don't actually delete the formula from their repository.) To override that we must use `brew install shivammathur/php/[email protected]` internally. Therefore, we need to maintain a list of which PHP Versions we wish to specifically prefix with the `shivammathur/php` tap in order to bypass Homebrew's flags. **ANNUAL MAINTENANCE** 1. This PR adds the array of `LIMITED_PHP_VERSIONS` which we will have to update annually when new PHP versions are retired as others are released. 2. We should also annually update the `LATEST_PHP_VERSION` string.
Description
Just got a new M2 MacBook Pro. Totally fresh install of Valet, but I can't seem to install PHP 7.4. I've searched for similar issues and tried a few things. This issues seems unique from other issues considering the line number: 145. Trying
valet use [email protected] --force -vvv
Steps To Reproduce
valet use [email protected] --force -vvv
Diagnosis
sw_vers
valet --version
cat ~/.config/valet/config.json
cat ~/.composer/composer.json
composer global diagnose
composer global outdated
ls -al /etc/sudoers.d/
brew config
brew services list
brew list --formula --versions | grep -E "(php|nginx|dnsmasq|mariadb|mysql|mailhog|openssl)(@\d\..*)?\s"
brew outdated
brew tap
php -v
which -a php
php --ini
nginx -v
curl --version
php --ri curl
/opt/homebrew/bin/ngrok version
ls -al ~/.ngrok2
brew info nginx
brew info php
brew info openssl
openssl version -a
openssl ciphers
sudo nginx -t
which -a php-fpm
/opt/homebrew/opt/php/sbin/php-fpm -v
sudo /opt/homebrew/opt/php/sbin/php-fpm -y /opt/homebrew/etc/php/8.2/php-fpm.conf --test
ls -al ~/Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchDaemons | grep homebrew
ls -al /Library/LaunchDaemons | grep "com.laravel.valet."
ls -aln /etc/resolv.conf
cat /etc/resolv.conf
ifconfig lo0
sh -c 'echo "------\n/opt/homebrew/etc/nginx/valet/valet.conf\n---\n"; cat /opt/homebrew/etc/nginx/valet/valet.conf | grep -n "# valet loopback"; echo "\n------\n"'
sh -c 'for file in ~/.config/valet/dnsmasq.d/*; do echo "------\n~/.config/valet/dnsmasq.d/$(basename $file)\n---\n"; cat $file; echo "\n------\n"; done'
sh -c 'for file in ~/.config/valet/nginx/*; do echo "------\n~/.config/valet/nginx/$(basename $file)\n---\n"; cat $file | grep -n "# valet loopback"; echo "\n------\n"; done'
The text was updated successfully, but these errors were encountered: