New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matomo 4.5 not working with PHP 8.1 RC3 (Matomo 4.4.1 worked fine) #18117
Comments
Indeed PHP 8.1 is not yet supported, but thanks for reporting the issue, that way we can get it working until it releases. We are tracking all issues in #17686, but it seems like this hasn't been seen yet (maybe because I tested with Matomo 4.4.1) |
Weirdly enough Matomo 4.5.0 is working fine for me in PHP 8.1.0beta2. I'll compile the latest release candidate and check again. |
It still seems to work for me: Maybe @diosmosis has an idea as #17736 is the only change I know in Matomo 4.5.0 related to those files. |
This seems like it might be a PHP issue... IteratorAggregate is an interface, nothing should inherit from it (just implement it). It also seems like this error might be covering up some other error. It might help to just print, log or file_put_contents the notification message in WebNotificationHandler to see what Matomo is trying to display. |
Was thinking if maybe #17989 regressed something there but doesn't seem to reference Possibly what happened in Matomo 4.5 is what @diosmosis suggested there's now a notice or warning or something that wasn't triggered before. Like eg if using IE11 or something and this now triggers the PHP 8.1 error but the error itself has been there in Matomo 4.4. We might be able to reproduce it by triggering a warning there ourselves using PHP 8.1 |
This would be ideally worked on by the same people that do #17686 |
Another one:
As it implements: https://www.php.net/manual/en/class.iteratoraggregate.php Probably setting: * @return Traversable for the |
I understand PHP 8.1 RC3 is not officially supported yet but decided to report this anyway. It worked fine with 4.4.1 until I upgraded to 4.5. Unfortunately downgrade doesn't work (database has already been upgraded) so I did some debugging to figure out a workaround.
I tripple checked that Matomo 4.5 was properly installed with a diff -qr between the zip and my installation.
PROBLEM:
PHP Fatal error: During inheritance of IteratorAggregate: Uncaught Error: Class "Piwik\Session\SessionNamespace" not found in /var/www/.../core/Notification/Manager.php:203 Stack trace:#0 /var/www/.../core/Notification/Manager.php(147): Piwik\Notification\Manager::getSession()
WORKAROUND:
File: /var/www/.../plugins/Monolog/Handler/WebNotificationHandler.php
Comment out: Manager::notify(Common::getRandomString(), $notification);
The text was updated successfully, but these errors were encountered: