Allow dynamic properties for \Drupal\facets\Result\Result

Created on 4 February 2025, 2 months ago

Problem/Motivation

Currently in class \Drupal\facets\Result\Result we have declared properties like termWeight which are used by \Drupal\facets\Plugin\facets\processor\TermWeightWidgetOrderProcessor only. If we need to implement some other sort processor plugin using the same approach we sometimes also need to use custom dynamic properties for the Result object. Unfortunately, to do that is not possible with PHP 8.3 (as we will have a warning regarding the deprecation of dynamic properties).

Steps to reproduce

Proposed resolution

Probably it make sense to allow for \Drupal\facets\Result\Result dynamic properties by adding #[\AllowDynamicProperties] for class declaration.
Please see the proposed patch.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

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