Dynamic properties are deprecated PHP 8.2, explicitly declare WizardFormController::$wizardFactory

Created on 5 March 2023, over 1 year ago
Updated 27 March 2023, over 1 year ago

Problem/Motivation

When running tests that rely on ctools in PHP 8.2, deprecation errors are thrown like:

Exception: Deprecated function: Creation of dynamic property Drupal\ctools\Controller\WizardFormController::$wizardFactory is deprecated
Drupal\ctools\Controller\WizardFormController->__construct()() (Line: 48)

Proposed resolution

It is possible to alleviate these deprecation errors by adding #[\AllowDynamicProperties] before the class declaration, but in this case it may make more sense to explicitly declare $wizardFactory as a public property instead.

🌱 Plan
Status

Closed: duplicate

Version

4.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada mandclu

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024