Select2 Plugin is not compatible with BEF plugin

Created on 23 October 2024, 3 months ago

Problem/Motivation

select2(1.15) throwing following error with bef(7.0.1)

Fatal error:  Declaration of Drupal\select2\Plugin\better_exposed_filters\filter\Select2::defaultConfiguration() must be compatible with Drupal\better_exposed_filters\Plugin\better_exposed_filters\filter\FilterWidgetBase::defaultConfiguration(): array in /var/www/html/web/modules/contrib/select2/src/Plugin/better_exposed_filters/filter/Select2.php on line 21"

Fatal error:  Declaration of Drupal\select2\Plugin\better_exposed_filters\filter\Select2::buildConfigurationForm(array $form, Drupal\Core\Form\FormStateInterface $form_state) must be compatible with Drupal\better_exposed_filters\Plugin\better_exposed_filters\filter\FilterWidgetBase::buildConfigurationForm(array $form, Drupal\Core\Form\FormStateInterface $form_state): array in /var/www/html/web/modules/contrib/select2/src/Plugin/better_exposed_filters/filter/Select2.php on line 53"

Steps to reproduce

  1. Select BEF as a exposed form in views
  2. Click on Settings under Exposed form style.

Proposed resolution

  1. Add return type decration in bef_select2 plugin.
๐Ÿ› Bug report
Status

Active

Version

1.15

Component

Views integration

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia sonvir249 Pune

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