Problem/Motivation

composer outdated currently lists the following available major updates:

composer/installers                v1.12.0 v2.0.1  A multi-framework Compose...
composer/xdebug-handler            2.0.4   3.0.1   Restarts a process withou...
psr/log                            1.1.4   3.0.0   Common interface for logg...
symfony/console                    v5.4.3  v6.0.3  Eases the creation of bea..

composer/installers and symfony/console have their own issues, but I've not found anything about psr/log.

It's possible for Composer to resolve an update to at least psr/log 2. 3.0.0 is not possible because:

[ayrton:drupal | Tue 17:59:10] $ composer why psr/log
composer/composer        2.2.6       requires   psr/log (^1.0 || ^2.0)    
symfony/console          v5.4.3      conflicts  psr/log (>=3)             

Proposed resolution

Maybe an update to psr/log 3.0.0 will be possible once #3264918: Update symfony/console to Symfony 6 is resolved, but for now, let's try requiring v2.

Remaining tasks

See if the patch works.

API changes

None.

Data model changes

N/A

Release notes snippet

psr/log version 2 is now required. The package has been updated from version 1.1.4 to 2.0.0

CommentFileSizeAuthor
#2 3266017-psr-log.patch6.18 KBxjm

Comments

xjm created an issue. See original summary.

xjm’s picture

Status: Active » Needs review
StatusFileSize
new6.18 KB
xjm’s picture

Issue summary: View changes
xjm’s picture

I checked and the BC breaks seem limited to adding string|\Stringable typehints to various parameters and return values for strings, aside from some internal trait/base class refactoring.

xjm’s picture

Issue summary: View changes
Issue tags: +10.0.0 release notes

Looks like there are no changes needed to D10's API.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Agree that this doesn't affect us directly, we can just upgrade to v2 now, and try for v3 when we have upgraded symfony/console.

longwave’s picture

Changes in v2 are here: https://github.com/php-fig/log/pull/76/files

If we wanted to we could switch LoggerTrait for extending AbstractLogger, and also add string|\Stringable to the $message argument, but let's do that in a followup. We can then also prepare for v3 by adding void return types.

  • catch committed 5ecc811 on 10.0.x
    Issue #3266017 by xjm, longwave: Update psr/log to v2
    
catch’s picture

Status: Reviewed & tested by the community » Fixed

Agreed let's do any tidy up and/or v3 prep in follow-ups.

Committed 5ecc811 and pushed to 10.0.x. Thanks!

xjm’s picture

Issue summary: View changes
xjm’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.