matomo-php-tracker icon indicating copy to clipboard operation
matomo-php-tracker copied to clipboard

Creation of dynamic property MatomoTracker::$currentTs is deprecated

Open dkossako opened this issue 1 year ago • 3 comments

There are some deprecations in latest version of tracker:

Creation of dynamic property MatomoTracker::$currentTs is deprecated

Also other properties are affected:

  • MatomoTracker::$forcedVisitorId
  • MatomoTracker::$requestTimeout
  • MatomoTracker::$configCookiePath
  • MatomoTracker::$visitCount
  • MatomoTracker::$ecommerceLastOrderTimestamp
  • MatomoTracker::$doBulkRequests
  • MatomoTracker::$incomingTrackerCookies
        $this->currentTs = time();
        $this->createTs = $this->currentTs;
        $this->visitCount = 0;
        $this->currentVisitTs = false;
        $this->lastVisitTs = false;
        $this->ecommerceLastOrderTimestamp = false;

dkossako avatar Mar 01 '24 11:03 dkossako

Thanks for raising the issue @dkossako, we will look into adding class variables for the dynamic properties.

michalkleiner avatar Mar 13 '24 01:03 michalkleiner

Can you confirm what version of PHP you're running the tracker on? Is it 8.2?

michalkleiner avatar Mar 13 '24 01:03 michalkleiner

8.3.3

dkossako avatar Mar 13 '24 09:03 dkossako

@sgiehl you have merged my PR, can we tag the new version and close this issue?)

lutdev avatar May 10 '24 21:05 lutdev

@lutdev let's do it together with #132.

michalkleiner avatar May 13 '24 05:05 michalkleiner