0

After updating data-migration-tool I get this error every time I try to run the command:

  Warning: Could not check compatibility between Migration\Logger\Logger::addRecord(int $level, string $message, array $context = Array, ?Migration\Logger\DateTimeImmutable $datetime = NULL): bool and Monolog\Logger::addRecord(int $level, string $message, array $context = Array,   
  ?Monolog\DateTimeImmutable $datetime = NULL): bool, because class Migration\Logger\DateTimeImmutable is not available in public_html/vendor/magento/data-migration-tool/src/Migration/Logger/Logger.php on line 34 

How can I come back to the earlier version of data-migration-tool? Is it possible or should I made changes in Logger file?

1 Answer 1

1

I have found the solution: Magento requires version ^2.6 of monolog, which means that 2.7.0 is the highest version that is installed when your composer create-project of Magento.

So, you need to execute the command:

composer require monolog/monolog:2.6 
bin/magento setup:upgrade

As a reference: https://github.com/magento/magento2/issues/35604#issuecomment-1158838365

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.