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: Creation of dynamic property NNN is deprecated #111

Open
hexa2k9 opened this issue Dec 14, 2022 · 2 comments
Open

PHP 8.2: Creation of dynamic property NNN is deprecated #111

hexa2k9 opened this issue Dec 14, 2022 · 2 comments

Comments

@hexa2k9
Copy link

hexa2k9 commented Dec 14, 2022

I'm using MatomoTracker in a PHP application running on various PHP Versions (7.4, 8.0, 8.1, 8.2). While most of the versions are running just fine on PHP 8.2 I see a lot of deprecation Messages when using the Tracker:

PHP Deprecated:  Creation of dynamic property MatomoTracker::$ecommerceItems is deprecated in APPLICATION/vendor/matomo/matomo-php-tracker/MatomoTracker.php on line 85
PHP Deprecated:  Creation of dynamic property MatomoTracker::$attributionInfo is deprecated in APPLICATION/vendor/matomo/matomo-php-tracker/MatomoTracker.php on line 86
PHP Deprecated:  Creation of dynamic property MatomoTracker::$eventCustomVar is deprecated in APPLICATION/vendor/matomo/matomo-php-tracker/MatomoTracker.php on line 87
PHP Deprecated:  Creation of dynamic property MatomoTracker::$forcedDatetime is deprecated in APPLICATION/vendor/matomo/matomo-php-tracker/MatomoTracker.php on line 88
PHP Deprecated:  Creation of dynamic property MatomoTracker::$forcedNewVisit is deprecated in APPLICATION/vendor/matomo/matomo-php-tracker/MatomoTracker.php on line 89
PHP Deprecated:  Creation of dynamic property MatomoTracker::$networkTime is deprecated in APPLICATION/vendor/matomo/matomo-php-tracker/MatomoTracker.php on line 90
PHP Deprecated:  Creation of dynamic property MatomoTracker::$serverTime is deprecated in APPLICATION/vendor/matomo/matomo-php-tracker/MatomoTracker.php on line 91
@Cangoo
Copy link

Cangoo commented Jan 16, 2023

As a workaround you could add #[AllowDynamicProperties] before the class-definition until the problem is solved:

#[AllowDynamicProperties]
class MatomoTracker

@sgiehl
Copy link
Member

sgiehl commented Jan 18, 2023

@Cangoo Thanks for the hint. I'll add that quickly.

sgiehl added a commit that referenced this issue Jan 18, 2023
@sgiehl sgiehl added this to the Current sprint milestone Jan 18, 2023
@innocraft-automation innocraft-automation removed this from the Current sprint milestone Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants