Skip to content
New issue

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

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

Already on GitHub? # to your account

Not switching to PHP 8.0 properly since PHP 8.1 release #54

Closed
Edsardio opened this issue Nov 26, 2021 · 4 comments
Closed

Not switching to PHP 8.0 properly since PHP 8.1 release #54

Edsardio opened this issue Nov 26, 2021 · 4 comments
Assignees
Labels
waiting for homebrew fix This issue requires a change to Homebrew or a Homebrew dependency before it can be resolved.

Comments

@Edsardio
Copy link

Hello 🙏

As PHP8.1 was released yesterday I, with a lot of others, obviously downloaded the new version.
This new version gets installed in /usr/local/Cellar/php. For some reason phpmon still looks for PHP8.0 in that directory (based on screenshot below and the text between the brackets) and not in the /usr/local/Cellar/pho@8.0 directory. Because of this when switching to PHP8.0 it still remains on PHP8.1.

Screenshot 2021-11-26 at 09 17 41

@nicoverbruggen
Copy link
Owner

nicoverbruggen commented Nov 26, 2021

Yes, this is currently a known issue, and is unfortunately out of my hands.

Made two tweets about it yesterday. When PHP 8.1 is merged into Homebrew core this problem will be fixed. If you're curious about what’s going on with that, I'm keeping my eyes on this MR on the homebrew-core repo.

See also: shivammathur/homebrew-php#679 for a temporary workaround!

@nicoverbruggen nicoverbruggen changed the title Not switching to PHP8.0 properly since PHP8.1 release Not switching to PHP 8.0 properly since PHP 8.1 release Nov 26, 2021
@nicoverbruggen nicoverbruggen pinned this issue Nov 26, 2021
@nicoverbruggen
Copy link
Owner

Pinning this issue until this is resolved. I'm sure other people will have the same issue as me and you :)

@nicoverbruggen nicoverbruggen self-assigned this Nov 26, 2021
@nicoverbruggen nicoverbruggen added the waiting for homebrew fix This issue requires a change to Homebrew or a Homebrew dependency before it can be resolved. label Nov 26, 2021
@Edsardio
Copy link
Author

Thanks for your quick reply and clear answer! Let the waiting begin 😄

nicoverbruggen added a commit that referenced this issue Nov 28, 2021
* The information extracted from Homebrew's JSON command now also
  includes information about linked keg and installations.

* The mapped versions in the App class now contain information about
  the Homebrew installation as well.

* A HomebrewDiagnostics class has been added, which is currently able
  to detect conflicts between the `php` formulae of core and the
  `shivammathur/php` tap (which is currently an issue, see #54)

* Alerts are now displayed as critical if they are truly problematic.

* PhpInstallation was renamed to ActivePhpInstallation, to make room
  for a generic PhpInstallation object which contains cached info.

* Shell.pipe() now returns the contents of standardError if
  standardOutput was empty and there was some data in standardError.
  This makes it easier to debug the output of commands that output to
  standardError. (For example, failed brew commands might.)
@nicoverbruggen
Copy link
Owner

nicoverbruggen commented Nov 28, 2021

This issue should now be fixed. You may want to remove the tap version of 8.1 if you want to use the Homebrew core version instead. I tend to stick with the core version for supported PHP versions :)

I fixed my setup by running:

brew update
brew upgrade
brew uninstall --ignore-dependencies shivammathur/php/php@8.1
brew install php@8.0
brew install php@8.1

After this, PHP Monitor should be able to work correctly again.

To make sure all services and such are set up correctly you may want to use the Force load latest PHP version first, after which switching should work. 🤞

You can also install unsupported versions of PHP which are available via the tap (5.6, 7.0, 7.1, 7.2, 8.2 dev), those are unaffected by this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
waiting for homebrew fix This issue requires a change to Homebrew or a Homebrew dependency before it can be resolved.
Projects
None yet
Development

No branches or pull requests

2 participants