FTBFS - must be compatible with Psr\Log\AbstractLogger

Bug #1967796 reported by Athos Ribeiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-klogger (Ubuntu)
Fix Released
Undecided
Athos Ribeiro

Bug Description

php-klogger FTBFS with the following error:

phpunit --bootstrap src/Logger.php
PHP Fatal error: Declaration of Katzgrau\KLogger\Logger::log($level, $message, array $context = []) must be compatible with Psr\Log\AbstractLogger::log($level, Stringable|string $message, array $context = []): void in /<<PKGBUILDDIR>>/src/Logger.php on line 211
make[1]: *** [debian/rules:14: override_dh_auto_test] Error 255
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:5: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

This happens due to lack of compliance with psr/log 3, which is now in -proposed.

Note that a fix here should also include changes to composer.json to ensure the final binary package depends on the correct version of php-psr-log.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

The attached patch fixes this package builds for the new php-psr-log package.

A PPA with the package is available at https://launchpad.net/~athos-ribeiro/+archive/ubuntu/php-klogger-lp1967796/+packages

I ran the autopkgtest suite locally (for the proposed pocket). Here is the result summary:

autopkgtest [15:21:47]: @@@@@@@@@@@@@@@@@@@@ summary
phpunit PASS

Revision history for this message
Bryce Harrington (bryce) wrote :

Yes, this looks good to me. I've noticed some upstreams have generally tended to delete the type info from the code comments when they add the type parameters to the function args (I suppose to avoid duplication) but for our purposes updating both places is just fine.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks Bryce!

I just pushed this one.

dput ubuntu php-klogger_1.2.1-4ubuntu1_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: $PKGPATH/php-klogger_1.2.1-4ubuntu1_source.changes: Valid signature from 033C4CA276024834
Checking signature on .dsc
gpg: $PKGPATH/php-klogger_1.2.1-4ubuntu1.dsc: Valid signature from 033C4CA276024834
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading php-klogger_1.2.1-4ubuntu1.dsc: done.
  Uploading php-klogger_1.2.1-4ubuntu1.debian.tar.xz: done.
  Uploading php-klogger_1.2.1-4ubuntu1_source.buildinfo: done.
  Uploading php-klogger_1.2.1-4ubuntu1_source.changes: done.
Successfully uploaded packages.

tags: added: patch
Changed in php-klogger (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php-klogger - 1.2.1-4ubuntu1

---------------
php-klogger (1.2.1-4ubuntu1) jammy; urgency=medium

  * d/p/0005-psr-logger-compliance.patch: comply with php-psr-log 3.
    (LP: #1967796)

 -- Athos Ribeiro <email address hidden> Mon, 04 Apr 2022 11:39:42 -0300

Changed in php-klogger (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.