Fix Deprecated function: Creation of dynamic property for PHP 8.2 - GoogleAnalyticsReportsApiFeed::$time

Created on 4 December 2023, 12 months ago
Updated 14 December 2023, 11 months ago

Problem/Motivation

Getting this error in Drupal 10 -
Deprecated function: Creation of dynamic property Drupal\google_analytics_reports_api\GoogleAnalyticsReportsApiFeed::$time is deprecated in Drupal\google_analytics_reports_api\GoogleAnalyticsReportsApiFeed->__construct() (line 194 of /home/drupal10/modules/google_analytics_reports/google_analytics_reports_api/src/GoogleAnalyticsReportsApiFeed.php)

Proposed resolution

Add protected $time in the class

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ❌ Release google_analytics_reports-8.x-3.1 , google_analytics_reports-4.0.0-beta1

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

3.0

Component

API module

Created by

🇮🇳India akdugar

Live updates comments and jobs are added and updated live.
  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024