cix
(Francesco De Marchi)
January 18, 2023, 4:13pm
1
Il log del processo in cron che archivia i dati da ancora qualche chiamata deprecata credo tocchi aspettare un’altro aggiornamento giusto?
WARNING [2023-01-18 16:05:01] 97151 /web/matomo/plugins/GoogleAnalyticsImporter/Commands/GenerateGaTestData.php(443): Deprecated - Using ${var} in strings is deprecated, use {$var} instead - Matomo 4.13.1 - 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 4.13.1
PHP 8.1.14
tassoman
(Tassoman)
January 19, 2023, 11:06am
2
Ciao Francesco,
grazie per la segnalazione, in realtà anziché segnalare nel forum, in questo caso (le deprecazioni php) sarebbe meglio segnalarle una ad una su Github , direttamente.
opened 03:05PM - 12 Jun 22 UTC
closed 02:24PM - 18 Jan 23 UTC
Task
Help wanted
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](https://github.com/php/php-src/blob/php-8.2.0alpha1/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
https://github.com/matomo-org/matomo/pull/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)
https://github.com/matomo-org/matomo/blob/e3218471244d08039b1b84f1c907f1be0e018768/core/Console.php#L135
https://wiki.php.net/rfc/deprecate_partially_supported_callables
https://php.watch/versions/8.2/partially-supported-callable-deprecation
-------------
To be updated...