PHP 8.2 Deprecation function - creation of dynamic property error

Created on 25 March 2024, 8 months ago
Updated 13 June 2024, 5 months ago

Problem/Motivation

When on D10 with the latest version of this module and PHP 8.2, there's an error;

Creation of dynamic property Drupal\Core\Form\FormState::$dependent_exposed_filters is deprecated in Drupal\views_dependent_filters\Plugin\views\filter\ViewsDependentFilter->buildExposedForm()

Steps to reproduce

Set up a Drupal 10 (PHP 8.2) with views dependent filters 1.1. Create a view with dependent filters.
Go to the front-end and try to filter.
Nothing changes and we see an error.

Proposed resolution

Use $form_state->set('dependent_exposed_filters') instead of $form_state->dependent_exposed_filters[]

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇧🇪Belgium pietermouton

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