0

I use PopOs for work. PopOs has released version 22.4 but it comes with PHP 8.1 and our development project (Laravel) uses php_cs_fixer and it currently only supports PHP 8.0. I was tasked to test if we should upgrade to PopOs 22.4 yesterday. I tested phpbrew and homebrew. Neither of them worked well. phpbrew doesn't work once I upgrade to PHP 8.1 (it has a single deprecated function in it, everywhere). Homebrew didn't seem to work and recommended editing the apache2 httpd.conf file, but our project isn't using Apache. I currently have PHP 8.0 installed (found at /usr/bin/php8.0) but the cli still says I'm using PHP 8.1.7. I used update-alternatives --set php /usr/bin/php8.0 to try and change the version the cli is using but that doesn't seem to work although when I when I execute update-alternatives --display php it reports that my link is pointing to /usr/bin/php8.0. Yet, php -v returns:

PHP 8.1.7 (cli) (built: Jun 7 2022 18:21:38) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.7, Copyright (c) Zend Technologies with Zend OPcache v8.1.7, Copyright (c), by Zend Technologies

I'm desperate, this is my work computer and I need to get this working. How does one literally revert from PHP 8.1 back down to version 8.0?

MES5464
  • 87
  • 1
  • 2
  • 6

1 Answers1

0

You can uninstall the php 8.1 directly through the terminal.

sudo apt remove php8.1
sudo apt autoremove

Hope this help you.

AhMing
  • 16
  • 5
  • Thank you for the reply. I already ran both these commands, but I did it again, just in case. After doing so, I ran `php -v` and I still get a response of PHP 8.1.7. – MES5464 Jun 15 '22 at 16:20