civicrm / civicrm/cv

psr Logger needs update

Open
#294 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
45
Forks
36
Avg merge
17h 54m
Merged PRs (30d)
3

Description

Running cv on civicrm 6.16.5 results in error:

`PHP Fatal error: Declaration of Psr\Log\AbstractLogger::emergency(Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::emergency($message, array $context = []) in /home/njlp/public_html/libraries/vendor/psr/log/src/LoggerTrait.php on line 18`

Libraries in cv lib/src/Log need update to newer psr interface.

I am running cv version 0.3.71. Civicrm is installed on a Joomla CMS.

Rolling back the civicrm libraries in libraries/vendor/psr/log/src and civicrm/vendor/psr/log/Psr/Log. Is a workaround. I also had to change the file libraries/src/Log/DelegatingPsrLogger.php to use the old interface as well.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with cv 0.3.71 against CiviCRM 6.16.5, then inspect the PSR logging files under lib/src/Log, libraries/vendor/psr/log/src, civicrm/vendor/psr/log/Psr/Log, and libraries/src/Log/DelegatingPsrLogger.php. Done means the logger interfaces are compatible and cv no longer raises the reported PHP fatal error without rolling back vendor files.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.