Problem/Motivation

Following PHP error occurred with PHP 8.2 in a Drupal 10 installation.

Steps to reproduce

  1. Enable event_log_track_ui module.
  2. Login the website.
  3. The following PHP error is occurred.
  4. Deprecated function: Creation of dynamic property Drupal|Core\Form|FormState::$_event_log_track_logged is deprecated in event_log _track ui_form_submit) (line 21 of modules/contrib/events_log_track/modules/event_log_track ui/event_log_track ui.module).

Test environment:
Drupal core: 10.0.5
PHP version: PHP 8 >= 8.2.0

Reference:
https://www.php.net/manual/en/migration82.deprecated.php
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21Fo...
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21Fo...

Proposed resolution

Use FormState::hasTemporaryValue() and FormState::setTemporaryValue() instead.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mingsong created an issue. See original summary.

Mingsong’s picture

Issue summary: View changes
Mingsong’s picture

Mingsong’s picture

Issue summary: View changes
Status: Active » Needs review

  • Mingsong committed d6ee474a on 3.0.x
    Issue #3349786: Deprecated function error with PHP 8.2 in Drupal 10
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

See no issue with it.

smustgrave’s picture

Status: Reviewed & tested by the community » Fixed
Mingsong’s picture

Thanks @Stephen.

May I ask if we had a plan to release a new version at some point?
There are couple of fixes for bugs sitting in the develop branch since 3.1.4. It would be great if we could have a new version sooner better than later.

Cheers,

smustgrave’s picture

Sure

Mingsong’s picture

Thank you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.