After upgrading to Drupal 10.2, my website won't work anymore because getDescription signature of ConfigEntityDescriptionTrait is not compatible with EntityDisplayModeBase class

Edit : Erratum, the issue is only on 10.2
Composer installed 10.2.aplha instead of 10..1.7 for no good reason.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arnaud-brugnon created an issue. See original summary.

arnaud-brugnon’s picture

Here's a fix

Status: Needs review » Needs work

The last submitted patch, 2: 3408813-2.patch, failed testing. View results

arnaud-brugnon’s picture

Issue summary: View changes

viren18febS made their first commit to this issue’s fork.

viren18febS’s picture

I have resolved the issue & added patch, please review.

ckhalilo’s picture

Must add string as Type of function getDescription()

public function getDescription() :string {
You can simply add (string) in return

return (string) $this->getThirdPartySetting('lightning_core', 'description');

Environment
- PHP8.2
- D10.2

Goldfit’s picture

I have resolved the issue with the provided changes.

Goldfit’s picture

siddharthjain’s picture

The patch shared in #9 applies smoothly. Thanks for the patch @Goldfit

tommasorandazzo’s picture

+1 to patch in #9.

tommasorandazzo’s picture

Status: Needs review » Reviewed & tested by the community
Alina Basarabeanu’s picture

We came across the same error after upgrading to Drupal core 10.2.
The patch provided by #9 fixed the issue.
Please add this to a new stable release.

ananthakrishnan.kr’s picture

After upgrading to Drupal core 10.2 we also came across the same error.
Patch #9 fixed the issue.

manikandank03’s picture

I am also facing the same issue after upgrade Drupal 10.2.2 with PHP 8.2 and tried this patch #9, the issue fixed now and site was working fine.

SamLerner’s picture

The patch in #9 worked for me as well, upgrading to 10.2 with PHP 8.1. Thanks!