PHP 8.0.1 support?

Hi y’all,

Noticed my main Libre host updated to php 8.0 (Ubuntu 18.04.5 LTS), PHP 8.0.1 (cli).

Getting the following errors that make it appear LibreNMS doesn’t support php 8.0, couldn’t find anything on Google, can anyone confirm?

Everything seems to “work”, just errors in the Validate section of the Web UI and ./validate.php output here:

Updating to latest codebase                        OK
Updating Composer packages                         FAIL
> LibreNMS\ComposerHelper::preInstall
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires php ^7.3 but your php version (8.0.1) does not satisfy that requirement.
  Problem 2
    - darkghosthunter/larapoke is locked to version dev-master and an update of this package was not requested.
    - darkghosthunter/larapoke dev-master requires php ^7.2 -> your php version (8.0.1) does not satisfy that requirement.
  Problem 3
    - darkghosthunter/larapoke dev-master requires php ^7.2 -> your php version (8.0.1) does not satisfy that requirement.
    - darkghosthunter/larapoke is locked to version dev-master and an update of this package was not requested.
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK

Output of attempting composer update:

librenms@libre ~ % composer update
Deprecation Notice: Required parameter $path follows optional parameter $schema in /usr/share/php/JsonSchema/Constraints/UndefinedConstraint.php:62
Deprecation Notice: Required parameter $path follows optional parameter $schema in /usr/share/php/JsonSchema/Constraints/UndefinedConstraint.php:108
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in /usr/share/php/Composer/Repository/RepositoryManager.php:129
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in /usr/share/php/Composer/Repository/RepositoryManager.php:129

In ArrayLoader.php line 44:

  Unknown package has no name defined ([{"name":"amenadiel\/jpgraph"

And finally the Web UI validate:

Fail: PHP version of your webserver (7.4.14) does not match the cli version (8.0.1)

Fix:`If you updated PHP recently, restart php-fpm or apache to switch to the new version`

Should I open a GitHub issue instead?

Edit:

I was wondering why Ubuntu LTS would ship php 8 on Bionic, turns out it was the famous “ondrej” PHP PPA.

Used because Ubuntu Bionic had PHP at 7.2.

php:
  Installed: 2:8.0+80~exp2+ubuntu18.04.1+deb.sury.org+1
  Candidate: 2:8.0+80~exp2+ubuntu18.04.1+deb.sury.org+1
  Version table:
 *** 2:8.0+80~exp2+ubuntu18.04.1+deb.sury.org+1 500
        500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages
        500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main i386 Packages
        100 /var/lib/dpkg/status
     1:7.2+60ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu bionic/main i386 Packages

No, please don’t open up a Github issue leave it here.

We don’t support php 8 yet.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.