Deprecated function: Creation of dynamic property EmailRegistrationLogin::$config

Created on 16 March 2023, over 1 year ago
Updated 10 October 2023, 9 months ago

Problem/Motivation

I get the error message

Deprecated function: Creation of dynamic property Drupal\email_registration\Plugin\Commerce\CheckoutPane\EmailRegistrationLogin::$config is deprecated in Drupal\email_registration\Plugin\Commerce\CheckoutPane\EmailRegistrationLogin->__construct() (line 56 of modules/contrib/email_registration/src/Plugin/Commerce/CheckoutPane/EmailRegistrationLogin.php).

Steps to reproduce

  • Install the module on a Drupal 10 site with Commerce running on PHP 8.2.
  • Setup default order types and a simple product.
  • Setup default checkout flow. I have not enabled any checkout plugin of the email registration module, just the module itself.
  • Put the product into the cart.
  • Go to the cart and click on checkout. On the next pane you'll get the error message.

Proposed resolution

See https://php.watch/versions/8.2/dynamic-properties-deprecated for further details. Declare the property, as the annotation is only supported for PHP 8.x and no option as long as the module must support PHP 7.4.

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria mvonfrie

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

Comments & Activities

Production build 0.69.0 2024