Creation of dynamic property Drupal\lightning_scheduler\Time::$_serviceId is deprecated

Created on 26 September 2023, about 1 year ago
Updated 19 January 2024, 10 months ago

Problem/Motivation

Installing the Lightning Scheduler module on a PHP 8.2 site produces the persistent PHP notice error:
Deprecated function: Creation of dynamic property Drupal\lightning_scheduler\Time::$_serviceId is deprecated in Drupal\Component\DependencyInjection\Container->createService() (line 285 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Steps to reproduce

Install Lightning Scheduler module on a site running PHP 8.2

Proposed resolution

This seems to be caused by an addition to the services.yml file used by the mode:

    # Workaround for serializing decorated services. Remove when either
    # https://www.drupal.org/project/drupal/issues/2896993 or
    # https://www.drupal.org/project/drupal/issues/2531564 are fixed.
    properties:
      _serviceId: datetime.time

Looking at both linked issues, they have both been resolved. Can this workaround code now be removed?

🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

🇮🇳India sahal_va

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

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

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024