Deprecated function: Creation of dynamic property

Created on 21 November 2024, 3 days ago

Problem/Motivation

The issue with the deprecated property in your class occurs because of changes introduced in PHP 8.2. Dynamic properties (properties that are not explicitly declared in the class) are deprecated. In your code, the property $fields is dynamically created inside the constructor without being explicitly defined in the class.

Steps to reproduce

Install swapcard with php >=8.2

Proposed resolution

Declare variable i.e
/**
* Fields for the plugin.
*
* @var object
*/
protected $fields;

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇵🇰Pakistan Allahnoor Turab

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024