PHP 8.2: Dynamic Properties are deprecated

Created on 1 February 2024, 10 months ago
Updated 10 May 2024, 7 months ago

Problem/Motivation

With PHP 8.2 I got this error:
Deprecated function: Creation of dynamic property Drupal\acquia_perz_push\ExportTracker::$database is deprecated in Drupal\acquia_perz_push\ExportTracker->__construct() (line 44 of modules/contrib/acquia_perz/modules/acquia_perz_push/src/ExportTracker.php).

Steps to reproduce

Update PHP to 8.2. Edit/Create any content.

Proposed resolution

Add variable:

  /**
   * @var \Drupal\Core\Database\Connection
   */
  private Connection $database;
πŸ› Bug report
Status

Closed: duplicate

Version

4.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States eliasbrat

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

Comments & Activities

Production build 0.71.5 2024