Skip to content

Support for PHP >= 8.2 — Deprecated Dynamic Properties #68

Description

@maciej-kosiedowski

Background:

When using this SDK with newer than PHP 8.2 the following warning/error occurs due to the use of dynamic properties, which are causing deprecated warning:

Deprecated: Creation of dynamic property ... is deprecated

Steps to Reproduce:

Install the SDK in a project running PHP 8.2

Instantiate classes that assign values to undeclared properties.

Observe deprecation warnings in logs.

Expected Behavior:

The SDK should be compatible with >= PHP 8.2 without triggering deprecated dynamic property notices.

Possible Solution:

Declare all used properties explicitly in class definitions.
or usage of the #[\AllowDynamicProperties] attribute where applicable.

Environment:

PHP version: 8.2.x
SDK version: ^22

RFC

https://wiki.php.net/rfc/deprecate_dynamic_properties

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions