Skip to content
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

PHP 8.2 deprecation warnings #20236

Closed
4 of 6 tasks
heurteph-ei opened this issue Jan 18, 2023 · 25 comments · Fixed by #20289
Closed
4 of 6 tasks

PHP 8.2 deprecation warnings #20236

heurteph-ei opened this issue Jan 18, 2023 · 25 comments · Fixed by #20289
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@heurteph-ei
Copy link

heurteph-ei commented Jan 18, 2023

From https://forum.matomo.org/t/core-archive-datacollection-php-123-deprecated/48979/9

  • WARNING /home/analytics/www/core/CronArchive.php(251): Deprecated - Creation of dynamic property Piwik\CronArchive::$rawLogDao is deprecated - Matomo 4.13.1
  • WARNING /home/analytics/www/core/Console.php(135): Deprecated - Callables of the form ["Piwik\Console", "Symfony\Component\Console\Application::doRun"] are deprecated - Matomo 4.13.1 (see also Further PHP 8.2 compatibility improvements #19343 (comment) )

From https://forum.matomo.org/t/php-8-2-depreciated-features-on-ver-4-13-1/49221

  • PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php on line 52 (see also Further PHP 8.2 compatibility improvements #19343 (comment) )
  • PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/vendor/symfony/console/Symfony/Component/Console/Helper/QuestionHelper.php on line 120 (see also Further PHP 8.2 compatibility improvements #19343 (comment) )
  • WARNING: /plugins/CoreVisualizations/Visualizations/HtmlTable.php(293): Deprecated - Creation of dynamic property Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable::$siteSummary is deprecated - Matomo 4.13.1
  • WARNING: /plugins/CoreVisualizations/JqplotDataGenerator.php(125): Deprecated - Creation of dynamic property Piwik\Plugins\CoreVisualizations\JqplotDataGenerator\Chart::$dataTable is deprecated - Matomo 4.13.1
@heurteph-ei heurteph-ei added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Jan 18, 2023
@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/php-8-2-depreciated-features-on-ver-4-13-1/49221/4

@sgiehl
Copy link
Member

sgiehl commented Jan 18, 2023

The first two will be fixed with #20235

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Jan 18, 2023
@sgiehl sgiehl added this to the 4.13.2 milestone Jan 18, 2023
@MatomoForumNotifications

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/10

@MatomoForumNotifications

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/5

@mackaaij
Copy link

mackaaij commented Jan 23, 2023

Just tried to switch Matomo 4.13.1 to PHP 8.2 and noticed these warnings:
(@heurteph-ei asked me in #19343 to copy the warnings over here)

  • [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]

@justinvelluppillai
Copy link
Contributor

@mattab this is a regression we should include in the 4.13.2 release if not already scheduled

@justinvelluppillai justinvelluppillai added the Regression Indicates a feature used to work in a certain way but it no longer does even though it should. label Jan 23, 2023
@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/deprecated-warning-after-update-from-4-12-3-to-4-13-1-should-be-reported-here/49324/2

@heurteph-ei
Copy link
Author

heurteph-ei commented Jan 24, 2023

From https://forum.matomo.org/t/warning-plugins-corevisualizations-jqplotdatagenerator-evolution-php-89-deprecated/49341

  • WARNING: /plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php(89): Deprecated - Creation of dynamic property Piwik\Plugins\CoreVisualizations\JqplotDataGenerator\Chart::$dataTable is deprecated - Matomo 4.13.1 (Module: VisitsSummary, Action: getEvolutionGraph, In CLI mode: false)

From https://forum.matomo.org/t/deprecated-warning-after-update-from-4-12-3-to-4-13-1-should-be-reported-here/49324/3

  • WARNING: /plugins/VisitTime/Reports/GetByDayOfWeek.php(45): Deprecated - Creation of dynamic property Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Config::$disable_row_evolution is deprecated - Matomo 4.13.2 (Module: VisitTime, Action: getByDayOfWeek, In CLI mode: false)

From https://forum.matomo.org/t/php-warning-matomo-4-13-2/49412

  • WARNING: /plugins/CoreVisualizations/Visualizations/HtmlTable.php(293): Deprecated - Creation of dynamic property Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable\AllColumns::$siteSummary is deprecated - Matomo 4.13.2 (Module: Referrers, Action: getReferrerType, In CLI mode: false)

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/warning-plugins-corevisualizations-jqplotdatagenerator-evolution-php-89-deprecated/49341/2

@sgiehl sgiehl modified the milestones: 4.13.2, 4.13.3 Jan 25, 2023
@Suplanus
Copy link

Suplanus commented Jan 26, 2023

Next ones:

  • WARNING: /core/DataAccess/ArchiveWriter.php(130): Deprecated - Creation of dynamic property Piwik\DataAccess\ArchiveWriter::$doneFlag is deprecated - Matomo 4.13.2 - (Module: API, Action: get, Method: API.get, In CLI mode: false
  • WARNING: /core/ArchiveProcessor/PluginsArchiver.php(67): Deprecated - Creation of dynamic property Piwik\ArchiveProcessor\PluginsArchiver::$archiveWriter is deprecated - Matomo 4.13.2 - (Module: API, Action: get, Method: API.get, In CLI mode: false)
  • WARNING: /plugins/Contents/Archiver.php(34): Deprecated - Creation of dynamic property Piwik\Plugins\Contents\Archiver::$columnToSortByBeforeTruncation is deprecated - Matomo 4.13.2 - (Module: API, Action: get, Method: API.get, In CLI mode: false)
  • WARNING: /plugins/Contents/Archiver.php(35): Deprecated - Creation of dynamic property Piwik\Plugins\Contents\Archiver::$maximumRowsInDataTable is deprecated - Matomo 4.13.2 - (Module: API, Action: get, Method: API.get, In CLI mode: false)
  • WARNING: /plugins/Contents/Archiver.php(36): Deprecated - Creation of dynamic property Piwik\Plugins\Contents\Archiver::$maximumRowsInSubDataTable is deprecated - Matomo 4.13.2 - (Module: API, Action: get, Method: API.get, In CLI mode: false)

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/deprecated-warning-after-update-from-4-12-3-to-4-13-1-should-be-reported-here/49324/4

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/php-warning-matomo-4-13-2/49412/2

@sgiehl sgiehl self-assigned this Jan 30, 2023
@sgiehl sgiehl changed the title Another PHP 8.2 errors PHP 8.2 deprecation warnings Jan 30, 2023
@heurteph-ei
Copy link
Author

heurteph-ei commented Jan 30, 2023

Hi @sgiehl
Bravo for all the work done on this topic ! 👏
I still see 2 tasks that are not completed (in the first message)... Some forgetting?

@sgiehl
Copy link
Member

sgiehl commented Jan 30, 2023

Those won't be solvable without updating Symfony Console. As this breaks BC, this will be done with Matomo 5 in #18328

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/php-8-2-ver-4-13-3-symphony-errors/49489/2

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/warning-please-report-this-message-in-the-matomo-forums/49590/2

@wrooot
Copy link

wrooot commented Feb 19, 2023

To make sure it is covered adding what i see:
WARNING: /plugins/DBStats/Reports/Base.php(43): Deprecated - Creation of dynamic property Piwik\Plugins\CoreVisualizationsWisualizations\HtmlTable \Config::Skeep_summary_row is deprecated - Matomo 4.13.3
WARNING: /plugins/CoreVisualizationsficiplotDataGenerator/Evolution.php(89): Deprecated - Creation of dynamic property Piwik\Plugins\CoreVisualizationsVqplotDataGenerator\Chart::SdataTable is deprecated - Matomo 4.13.3

You mention it will be fixed in 5. Will it be an automatic update from 4.x branch or will require additional steps?

@heurteph-ei
Copy link
Author

@wrooot, as this issue is now closed, I suggest you create another issue in order to simplify the issue following...

@wrooot
Copy link

wrooot commented Feb 23, 2023

I am just not sure if my errors are different and not already covered by the same fix, so maybe not worth it opening a new issue.

@heurteph-ei
Copy link
Author

@wrooot, I browsed the Matomo issues in the GitHub repo and did not found the errors you mentioned...

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/as-signalled-added-to-forum-warning-plugins-events-archiver-php-82-deprecated/49342/2

@heurteph-ei
Copy link
Author

@wrooot issue created: #20402

@wrooot
Copy link

wrooot commented Feb 27, 2023

Thanks!

@hoangbaoan-cnpm4
Copy link

WARNING: \plugins\UserId\Reports\GetUsers.php(58): Deprecated - Creation of dynamic property Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable\Config::$show_active_view_icon is deprecated - Matomo 4.14.2 - 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: UserId, Action: getUsers, In CLI mode: false)

@sgiehl
Copy link
Member

sgiehl commented Jul 24, 2023

@hoangbaoan-cnpm4 please don't comment closed issues, as we likely might miss such comments.
The deprecation warning you posted, will be fixed in Matomo 5. See #20845

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants