Declaration of submitConfigurationForm must be compatible with BlockBase

Created on 24 July 2025, 21 days ago

Problem/Motivation

In 🐛 Block Plugins don't store their context mappings on submit Needs work BlockBase::submitConfigurationForm got the return type void. Which causes the following error in the spa module:

Fatal error: Declaration of Drupal\spa\Plugin\Block\SpaBlock::submitConfigurationForm(array &$form, Drupal\Core\Form\FormStateInterface $form_state) must be compatible with Drupal\Core\Block\BlockBase::submitConfigurationForm(array &$form, Drupal\Core\Form\FormStateInterface $form_state): void in /var/www/html/repos/spa/src/Plugin/Block/SpaBlock.php on line 124

Steps to reproduce

Install drupal 11.2 and go to /admin/structure

Proposed resolution

Add the return type in SpaBlock::submitConfigurationForm.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany Harlor Berlin

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