PHP 8.2 deprecation issue with AutosaveFormBuilder

Created on 20 April 2023, over 1 year ago
Updated 7 July 2024, 5 months ago

Problem/Motivation

Deprecated function: Creation of dynamic property Drupal\autosave_form\Form\AutosaveFormBuilder::$_serviceId is deprecated in Drupal\Component\DependencyInjection\Container->createService() (line 285 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Drupal\Component\DependencyInjection\Container->createService(Array, 'form_builder') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('form_builder') (Line: 640)

Steps to reproduce

Install it and view a page with the autosave form on PHP 8.2

Proposed resolution

Add

  /**
   * The service ID
   * 
   * @var string
   */
  public $_serviceId = 'autosave_form.form_builder';

to AutosaveFormBuilder.php

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States stevenlafl

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024