-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Further PHP 8.2 compatibility improvements #19343
Comments
Here is a list of additional warnings for Matomo with PHP8.2.
|
@utrautmann Thanks for reporting those. I've created #19690 to fix all of them in the next release. |
Here is a list of additional warnings from latest Matomo with PHP8.2 & 4.12.2
|
thanks @JEAholding for reporting those. I'll prepare a PR to fix them. |
New warning on the new upgraded head.... PHP8.2 & 4.12.3.... 1.WARNING: /core/Segment/SegmentExpression.php(59): Deprecated - Creation of dynamic property Piwik\Segment\SegmentExpression::$string is deprecated - Matomo 4.12.3 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: Live, Action: getLastVisitsStart, Method: Live.getLastVisitsDetails, In CLI mode: false) |
@JEAholding Added a fix for that to the other PR |
Here are a few more:
|
@justinvelluppillai The first one is something we can fix. The others are caused by vendor libs, so we can only fix that with updating the libs... |
Yes I see that 👍🏽 |
For the remaining vendor lib deprecation warning, I created an issue here: szymach/c-pchart#86 |
Looks like was released into v3.0.16 of c-pchart Same error inside PHP 8.1 installation |
This issue has been mentioned on Matomo forums. There might be relevant details there: https://forum.matomo.org/t/problemi-con-larchiviazione-con-cron/48744/2 |
This issue has been mentioned on Matomo forums. There might be relevant details there: https://forum.matomo.org/t/error-unserializing-during-cron-archive/48729/6 |
This issue has been mentioned on Matomo forums. There might be relevant details there: https://forum.matomo.org/t/warnings-on-core-files-after-upgrade-to-php-8-2-0/48797/2 |
This issue has been mentioned on Matomo forums. There might be relevant details there: https://forum.matomo.org/t/a-lot-of-warning-messages-of-deprecated/48816/4 |
It seems there is another kind of error, reported in the forum:
|
This issue has been mentioned on Matomo forums. There might be relevant details there: |
@heurteph-ei I've pushed a fix for that in be14b70 |
Some more deprecations for PHP 8.2 (opening "All Websites" or the settings): WARNING: /plugins/CustomDimensions/Dimension/CustomVisitDimension.php(23): Deprecated - Creation of dynamic property Piwik\Plugins\CustomDimensions\Dimension\CustomVisitDimension::$actualName is deprecated - Matomo 4.13.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: VisitsSummary, Action: get, In CLI mode: false) WARNING: /plugins/CustomDimensions/Dimension/CustomVisitDimension.php(25): Deprecated - Creation of dynamic property Piwik\Plugins\CustomDimensions\Dimension\CustomVisitDimension::$idDimension is deprecated - Matomo 4.13.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: VisitsSummary, Action: get, In CLI mode: false) WARNING: /core/Archive/DataCollection.php(123): Deprecated - Creation of dynamic property Piwik\Archive\DataCollection::$segment is deprecated - Matomo 4.13.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: API, Action: get, Method: VisitsSummary.get, In CLI mode: false) |
Can confirm Matomo v4.13.0 for the core:archive Cron on PHP 8.2.0. This Notice causing the cron to report as "error" and matomo backend then reporting it didn't run. Not happening in PHP 8.1
|
From: https://forum.matomo.org/t/core-archive-datacollection-php-123-deprecated/48979
|
This issue has been mentioned on Matomo forums. There might be relevant details there: https://forum.matomo.org/t/core-archive-datacollection-php-123-deprecated/48979/4 |
@brotkrueml @heurteph-ei I've pushed fixes for the reported deprecation warnings to #20177 @solariz Your report is related to a vendor lib. It was updated in #20114 and thus the error should be fixed in the next release. |
Hi @sgiehl
|
This issue has been mentioned on Matomo forums. There might be relevant details there: https://forum.matomo.org/t/php-erros-after-migration-to-4-1-13-1/49220/3 |
@heurteph-ei I've created a PR to fix them. I'll close this issue now. In general Matomo should already work with PHP 8.2. |
Hello again @sgiehl |
This issue has been mentioned on Matomo forums. There might be relevant details there: https://forum.matomo.org/t/ancora-qualche-chiamata-deprecata-durante-il-salvataggio/49280/2 |
Just tried to switch to PHP 8.2 and noticed these warnings: [Sat Jan 21 18:55:19.453052 2023] [lsapi:warn] [pid 2831069:tid 140286189504256] [client [redacted]:61721] [host [redacted]] Backend log: PHP Deprecated: Creation of dynamic property Piwik\Tracker\VisitExcluded::$request is deprecated in [redacted]/core/Tracker/VisitExcluded.php on line 40\n, referer: [redacted] [Sat Jan 21 18:55:19.453127 2023] [lsapi:warn] [pid 2831069:tid 140286189504256] [client [redacted]:61721] [host [redacted]] Backend log: PHP Deprecated: Creation of dynamic property Piwik\Tracker\VisitExcluded::$idSite is deprecated in [redacted]/core/Tracker/VisitExcluded.php on line 43\n, referer: [redacted] [Sat Jan 21 18:55:19.453167 2023] [lsapi:warn] [pid 2831069:tid 140286189504256] [client [redacted]:61721] [host [redacted]] Backend log: PHP Deprecated: Creation of dynamic property Piwik\Tracker\VisitExcluded::$userAgent is deprecated in [redacted]/core/Tracker/VisitExcluded.php on line 50\n, referer: [redacted] [Sat Jan 21 18:55:19.453188 2023] [lsapi:warn] [pid 2831069:tid 140286189504256] [client [redacted]:61721] [host [redacted]] Backend log: PHP Deprecated: Creation of dynamic property Piwik\Tracker\VisitExcluded::$ip is deprecated in [redacted]/core/Tracker/VisitExcluded.php on line 51\n, referer: [redacted] [Sat Jan 21 18:55:19.451220 2023] [lsapi:warn] [pid 2831069:tid 140286189504256] [client [redacted]:61721] [host [redacted]] Backend log: PHP Deprecated: Creation of dynamic property Piwik\Tracker\Request::$timestamp is deprecated in [redacted]/core/Tracker/Request.php on line 75\n, referer: [redacted] [Sat Jan 21 18:55:18.006969 2023] [lsapi:warn] [pid 2831069:tid 140286307002112] [client [redacted]:42132] [host [redacted]] Backend log: PHP Deprecated: Creation of dynamic property Piwik\Plugins\Referrers\Columns\ReferrerUrl::$campaignNames is deprecated in [redacted]/plugins/Referrers/Columns/Base.php on line 410\n, referer: [redacted] [Sat Jan 21 18:55:18.006993 2023] [lsapi:warn] [pid 2831069:tid 140286307002112] [client [redacted]:42132] [host [redacted]] Backend log: PHP Deprecated: Creation of dynamic property Piwik\Plugins\Referrers\Columns\ReferrerUrl::$campaignKeywords is deprecated in [redacted]/plugins/Referrers/Columns/Base.php on line 411\n, referer: [redacted] [Sat Jan 21 18:55:24.378796 2023] [lsapi:warn] [pid 2831069:tid 140286189504256] [client [redacted]:42132] [host [redacted]] Backend log: PHP Deprecated: Creation of dynamic property Piwik\Plugins\Actions\Actions\ActionSiteSearch::$originalUrl is deprecated in [redacted]/plugins/Actions/Actions/ActionSiteSearch.php on line 34\n, referer: [redacted] |
Done! Concerns Matomo version: 4.13.1. |
This issue has been mentioned on Matomo forums. There might be relevant details there: |
The first alpha of PHP 8.2 has been released and I got a bit of time, so I will be looking into what the major things are that will cause current Matomo to break when using PHP 8.2.
See also #17686 for 8.1
Reading through UPGRADING, I don't see any major breaking changes, but we will see what needs to be changed.
As only the first reported issue here seems to completely brake Matomo and with it fixed, the majority of Matomo is already working fine, I will only list one example per deprecated usage here and link to more information about the deprecation.
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/lukas/public_html/matomophp8/core/testMinimumPhpVersion.php on line 130
See https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
#19344 (there are also a few more occurances in tests)
WARNING [2022-06-12 15:26:34] 188990 /home/lukas/public_html/matomophp8/plugins/PrivacyManager/DoNotTrackHeaderChecker.php(29): Deprecated - Creation of dynamic property Piwik\Plugins\PrivacyManager\DoNotTrackHeaderChecker::$config is deprecated - Matomo 4.11.0-rc1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
I assume this will affect a lot of code, but also it should be really easy to detect with PHPStorm or PHP_CS:
https://wiki.php.net/rfc/deprecate_dynamic_properties
https://php.watch/versions/8.2/dynamic-properties-deprecated
https://github.com/squizlabs/PHP_CodeSniffer/issues/3489
And getting rid of such cases might make the code more readable and especially avoid bugs because of typos.
WARNING [2022-06-12 15:26:35] 188990 /home/lukas/public_html/matomophp8/core/Console.php(135): Deprecated - Callables of the form ["Piwik\Console", "Symfony\Component\Console\Application::doRun"] are deprecated - Matomo 4.11.0-rc1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
matomo/core/Console.php
Line 135 in e321847
https://wiki.php.net/rfc/deprecate_partially_supported_callables
https://php.watch/versions/8.2/partially-supported-callable-deprecation
To be updated...
The text was updated successfully, but these errors were encountered: