matomo-org / plugin-Migration

Migrate a Matomo Measurable (website, app, roll-up, ...) from one Matomo instance to another Matomo
5 stars 11 forks source link

PHP Fatal error: Declaration of Symfony\Bridge\Monolog\Handler\ConsoleHandler::handle(array $record) must be compatible with Monolog\Handler\AbstractProcessingHandler::handle(array $record) #55

Closed wbdb closed 1 year ago

wbdb commented 1 year ago

Migration-4.0.3

Command: /opt/plesk/php/8.1/bin/php wp-content/plugins/matomo/app/console migration:measurable --source-idsite=1 --target-db-host='127.0.0.1' --target-db-username='user1' --target-db-password='password!' --target-db-name='matomo_example'

Tested with PHP 7.4 and 8.1

PHP Fatal error: Declaration of Symfony\Bridge\Monolog\Handler\ConsoleHandler::handle(array $record) must be compatible with Monolog\Handler\AbstractProcessingHandler::handle(array $record): bool in /var/www/vhosts/example.com/wp-content/plugins/matomo/app/vendor/symfony/monolog-bridge/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php on line 88

snake14 commented 1 year ago

Hi @wbdb . I'm sorry that you are experiencing this issue. It looks like the Monolog version used by our plugin is conflicting with the version used by another plugin. Sadly, this is a known issue. A permanent fix is supposed to be part of the Matomo 5 release. In the meantime, you can check the list of WordPress plugins that are known to have compatibility issues and try disabling them.