Missing Return Type for PrivateMessageFloodPrivateMessageConfigForm::validateForm()

Created on 27 September 2024, 4 months ago

Problem/Motivation

In admin/config/private-message/config I have this error:

Fatal error: Declaration of Drupal\private_message_flood\Plugin\PrivateMessageConfigForm\PrivateMessageFloodPrivateMessageConfigForm::validateForm(array &$form, Drupal\Core\Form\FormStateInterface $formState) must be compatible with Drupal\private_message\Plugin\PrivateMessageConfigForm\PrivateMessageConfigFormBase::validateForm(array &$form, Drupal\Core\Form\FormStateInterface $formState): array in /var/www/html/web/modules/contrib/private_message_flood/src/Plugin/PrivateMessageConfigForm/PrivateMessageFloodPrivateMessageConfigForm.php on line 200

This is because PrivateMessageConfigFormBase::validateForm() in "private_message" (version 3.0.x-dev), the there is a return type declaration, an array.

Steps to reproduce

Install the mentioned versions and go to admin/config/private-message/config.

Proposed resolution

Add return types to methods in the existing classes and interfaces.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡΅πŸ‡ΉPortugal dxvargas

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