PHP 8.1 Calling static trait method is deprecated

Created on 10 July 2023, over 1 year ago

This is the clone of https://www.drupal.org/project/commerce/issues/3257723 but it is closed.

On PHP 8.1 during checkout when an inline form is used, the following deprecation is triggered:
Deprecated function: Calling static trait method Drupal\commerce\Element\CommerceElementTrait::shouldExecuteElementSubmit is deprecated, it should only be called on a class using the trait in Drupal\commerce\Element\CommerceElementTrait::validateElementSubmit() (line 65 of modules/contrib/commerce/src/Element/CommerceElementTrait.php).

This needs fix in CommerceElementTrait because 2 static public methods call 2 private static methods which is deprecated in php 8.1

🐛 Bug report
Status

Active

Version

2.0

Component

Other

Created by

🇭🇺Hungary dj1999

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024