Better Exposed Filters: Facets methods declarations must be compatible with FilterWidgetBase methods.

Created on 23 July 2024, about 2 months ago

Problem/Motivation

Drupal Version: 10.3.1
I'm getting these errors when trying to access the Better Exposed Filter settings in a view:

Fatal error:  Declaration of Drupal\facets\Plugin\better_exposed_filters\filter\Facets::isApplicable($filter = null, array $filter_options = []) must be compatible with Drupal\better_exposed_filters\Plugin\better_exposed_filters\filter\FilterWidgetBase::isApplicable(mixed $filter = null, array $filter_options = []): bool in /var/www/web/modules/contrib/facets/src/Plugin/better_exposed_filters/filter/Facets.php on line 74

Fatal error:  Declaration of Drupal\facets\Plugin\better_exposed_filters\filter\Facets::exposedFormAlter(array &$form, Drupal\Core\Form\FormStateInterface $form_state) must be compatible with Drupal\better_exposed_filters\Plugin\better_exposed_filters\filter\FilterWidgetBase::exposedFormAlter(array &$form, Drupal\Core\Form\FormStateInterface $form_state): void in /var/www/web/modules/contrib/facets/src/Plugin/better_exposed_filters/filter/Facets.php on line 22

Proposed resolution

Update these methods declarations to match the parent class.

🐛 Bug report
Status

Needs review

Version

3.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