[PHP 7.2] Incompatible method declarations

Created on 13 November 2017, about 7 years ago
Updated 12 September 2023, about 1 year ago

Finding more issues with incompatible methods declaration between interfaces and actual code, that lead to fatals in PHP 7.2. Shall we open one separate issue for each?

PHP Fatal error:  Declaration of Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::preSave(Drupal\Core\Entity\EntityStorageInterface $storage) must be compatible with Drupal\Core\Entity\EntityDisplayBase::preSave(Drupal\Core\Entity\EntityStorageInterface $storage, $update = true) in /home/travis/drupal8/core/modules/field_layout/src/Entity/FieldLayoutEntityFormDisplay.php on line 11

PHP Fatal error: Declaration of Drupal\forum\Form\Overview::buildForm(array $form, Drupal\Core\Form\FormStateInterface $form_state) must be compatible with Drupal\taxonomy\Form\OverviewTerms::buildForm(array $form, Drupal\Core\Form\FormStateInterface $form_state, ?Drupal\taxonomy\VocabularyInterface $taxonomy_vocabulary = NULL) in /home/travis/drupal8/core/modules/forum/src/Form/Overview.php on line 101

PHP Fatal error: Declaration of Drupal\Core\TypedData\ComputedItemListTrait::getValue() must be compatible with Drupal\Core\Field\FieldItemList::getValue($include_computed = false) in /home/travis/drupal8/core/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestFieldItemList.php on line 11

🐛 Bug report
Status

Fixed

Version

8.5 ⚰️

Component
Base 

Last updated about 6 hours ago

Created by

🇮🇹Italy mondrake 🇮🇹

Live updates comments and jobs are added and updated live.
  • PHP 7.2

    The issue particularly affects sites running on PHP version 7.2.0 or later.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024