Skip to content

fetch_reports.php no longer working after upgrading to php8.4 - Filesystem: Implicitly marking parameter $pathNormalizer as nullable is deprecated #156

@brozkeff

Description

@brozkeff

Using latest version from git via git pull 2.2.1, same effect was on previous used version 1.8:

I upgraded from old php7.4 to 8.4 via sury ppa on ubuntu 22.04 and cronjob to fetch reports stopped working.

Error on php8.4:

php8.4 -f ./utils/fetch_reports.php 
dmarc-srg [error]: ErrorException: League\Flysystem\Filesystem::__construct(): Implicitly marking parameter $pathNormalizer as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/nginx/html/dmarc/vendor/league/flysystem/src/Filesystem.php:24
Stack trace:
#0 /usr/share/nginx/html/dmarc/vendor/composer/ClassLoader.php(571): {closure:/usr/share/nginx/html/dmarc/init.php:72}()
#1 /usr/share/nginx/html/dmarc/vendor/composer/ClassLoader.php(571): include()
#2 /usr/share/nginx/html/dmarc/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#4 /usr/share/nginx/html/dmarc/classes/Core.php(310): class_exists()
#5 /usr/share/nginx/html/dmarc/utils/fetch_reports.php(171): Liuch\DmarcSrg\Core->checkDependencies()
#6 {main}
-----
Error: League\Flysystem\Filesystem::__construct(): Implicitly marking parameter $pathNormalizer as nullable is deprecated, the explicit nullable type must be used instead (-1)
-----
ErrorException: League\Flysystem\Filesystem::__construct(): Implicitly marking parameter $pathNormalizer as nullable is deprecated, the explicit nullable type must be used instead in /usr/share/nginx/html/dmarc/vendor/league/flysystem/src/Filesystem.php:24
Stack trace:
#0 /usr/share/nginx/html/dmarc/vendor/composer/ClassLoader.php(571): {closure:/usr/share/nginx/html/dmarc/init.php:72}()
#1 /usr/share/nginx/html/dmarc/vendor/composer/ClassLoader.php(571): include()
#2 /usr/share/nginx/html/dmarc/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#4 /usr/share/nginx/html/dmarc/classes/Core.php(310): class_exists()
#5 /usr/share/nginx/html/dmarc/utils/fetch_reports.php(171): Liuch\DmarcSrg\Core->checkDependencies()
#6 {main}

Running it manually with old php7.4 is OK and works.

Web app via apache and php8.4 seems to work ok.

PHP versions used:

PHP 8.4.3 (cli) (built: Jan 19 2025 14:20:34) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.3, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.3, Copyright (c), by Zend Technologies
php7.4 -v
PHP 7.4.33 (cli) (built: Dec 24 2024 07:11:50) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions