Composer issue, PHP 8.2

After updating to the latest version, I get this error

Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.2.0”.

I know that I might be a minority by using the current Ubuntu LTS version of PHP.
Still, a warning in the release notes would have been good. I thankfully have snapshots.

Hi,

Sorry for the trouble, there is a large notice in the release notes.

I am sorry, this is my fault, I only read the 5.9.1 notes.

For some strange reason, the error does not vanish even after updating to 8.3 and this:

sudo php -v
PHP 8.3.7 (cli) (built: May 23 2024 12:36:32) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.7, Copyright (c) Zend Technologies
with Zend OPcache v8.3.7, Copyright (c), by Zend Technologies

@david do you have any suggestions?

I’m having the same issue :frowning:

PHP 8.2.19 (cli) (built: May 23 2024 12:34:21) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.19, Copyright (c) Zend Technologies
with Zend OPcache v8.2.19, Copyright (c), by Zend Technologies

Mine was an easy fix - it looks like the fast cgi config needed to be updated and nginx just needed a reboot after that.

3 Likes

That could be it. Just a quick question, would it not be batter to use a generic php-fpm.sock? So we don’t have to change it every time we update PHP?

Might not be a bad idea. After I confirmed my version via cli and it was correct, I knew it was probably just a quick update to nginx (hopefully). Worked for me so I figured I’d throw it out there for others.

1 Like

If it helps anyone, I was stuck here too. I updated through the interface and received the ‘PHP version >= 8.2.0’ error on Ubuntu 20.04.

php -v showed 8.3 so I updated the following to reflect that version.

  • sudo -u www-data crontab -e
  • sudo vi /etc/nginx/conf.d/invoiceninja.conf (fastcgi_pass)
  • sudo vi /etc/php/8.3/fpm/php.ini (increase memory_limit to 1024m)
  • sudo vi /etc/supervisor/conf.d/laravel-worker.conf (not sure if this is needed anymore since it still said 7.4)

After rebooting, I kept getting sent to a /setup screen. Somehow was missing the mysql package.

  • sudo apt install php8.3-mysql

Works properly now.

1 Like

It also worked for me.

I am just unsure, why I have so many hard coded stuff?

Look at this list:

isn’t it strange to hard code it in all these places?
What is the reason for using a specific PHP version in general?
Any advantages I am missing?

1 Like

I agree. I have had it in place for quite a while and may have old set up/troubleshooting info from when v5 first came out. I’d like to nuke it and do it again from scratch on Ubuntu 24.04 to clean it up :slight_smile:

1 Like

I will do the same.

Time to update this :smile:

Did a clean install to test if everything is working.

Works great. Just two last questions.

  1. PHP 8.2 is needed, but is PHP 8.3 supported?
  2. Do we still need the artisan queque by installing superivsor? I see no warning in the on the webpage anymore
1 Like

Since you could not figure out if PHP 8.3 is supported, I will go with “no” and use 8.2 instead.

But is artisan still working? Or was it removed?

I have encountered the same issue after upgrading to version 5.11.62 through the web UI running on a Ubuntu 22.04 LTS LXC with Apache. I installed php8.3 and set it with update-alternatives --set php /usr/bin/php8.3 and also a2enmod proxy_fcgi setenvifand a2enconf php8.3-fpm as suggested after running apt upgrade. Now when I visit the InvoiceNinja page I get a black screen with a blue rotating circle in the center.

It may help to manually copy over the latest release tar

Thanks! I copied over the tar, my original .env, and changed the ownership and permissions of the files and it seems to be working again.

1 Like