Deprecated dynamic property error in GroupBreadcrumbBuilder::$groupDomainInfo

Created on 12 November 2024, 10 days ago

Problem/Motivation

In PHP 8.2, the creation of dynamic properties is deprecated, which leads to a deprecation warning in the Group Domain module. Specifically, the warning is generated by the GroupBreadcrumbBuilder class in src/Breadcrumb/GroupBreadcrumbBuilder.php due to a dynamic property assignment.

Error Message:

Deprecated: Creation of dynamic property Drupal\group_domain\Breadcrumb\GroupBreadcrumbBuilder::$groupDomainInfo is deprecated in /var/www/html/web/modules/contrib/group_domain/src/Breadcrumb/GroupBreadcrumbBuilder.php on line 19

Steps to reproduce

Install and enable the Group Domain module version 3.0 on a Drupal 10 site using PHP 8.2 or higher.

Navigate to any page that triggers the breadcrumb functionality of the Group Domain module.

Observe the deprecation warning related to dynamic properties in the logs.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024