Skip to content

Monolog issue #35604

@Nuranto

Description

@Nuranto

Preconditions and environment

  • Magento version 2.4.4
  • PHP8.1
  • Install data-migration-tool
  • Monolog 2.7.0

Steps to reproduce

  1. composer update
  2. bin/magento setup:upgrade

Expected result

Everything works fine

Actual result

PHP Fatal error:  Declaration of Migration\Logger\Logger::addRecord(int $level, string $message, array $context = []): bool must be compatible with Monolog\Logger::addRecord(int $level, string $message, array $context = [], ?Monolog\DateTimeImmutable $datetime = null): bool in /var/www/html/vendor/magento/data-migration-tool/src/Migration/Logger/Logger.php on line 34

Additional information

Monolog 2.7.0 has bee released yesterday, and have breaking changes.

Quick Solution : fix dependency to 2.6.0
Best Solution : fix compatibility issues

Note that everyone who upgrades to 2.4.4 from now will probably have this issue.

Quick solution for devs who don't want to wait for a fix & release : composer require monolog/monolog:2.6.0

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions