matomo-org / matomo-for-wordpress

Get a fully functioning Matomo Analytics for your WordPress. Star us on Github? +1. Matomo is the leading open alternative to Google Analytics that gives you full control over your data. Privacy is built-in. 100% data ownership, no one else can see your data. We love Pull Requests!
https://matomo.org
GNU General Public License v3.0
119 stars 25 forks source link

Fatal Error when updating from PHP 7.4 to PHP 8.1 #831

Closed enual closed 9 months ago

enual commented 1 year ago

A customer is getting an error when updating from PHP 7.4 to PHP 8.1.

Fatal error: Declaration of DI\Container::has($name) must be compatible with Psr\Container\ContainerInterface::has(string $id): bool in /wp-content/plugins/matomo/app/vendor/php-di/php-di/src/Container.php on line 210

System check report: Matomo-Plugin-Version: 4.15.0

Endpoints

Crons

Vorgeschriebene Prüfungen

Optionale Prüfungen

Matomo Settings

Logs

WordPress

WordPress Plugins

Server

PHP cli

Database

Browser

doni32 commented 1 year ago

This worked now with Xampp offline. I disabled the plugin “WP-Optimize – Clean, Compress, Cache”, slug: wp-optimize. See here: https://wordpress.org/support/topic/wordpress-fatal-error-with-matomo-and-php-8-1/

diosmosis commented 9 months ago

I did some basic testing and WP-Optimize appears to work with Matomo for WordPress 5.