[PHP 8.4] Deprecation warning at _gutenberg_is_gutenberg_enabled() and other places

Created on 15 July 2025, 22 days ago

Problem/Motivation

I was trying to use the Gutenberg Editor in a new D11.1 instance PHP 8.4 and I see the usual "he explicit nullable type" that is appearing on many modules:

Deprecated: _gutenberg_is_gutenberg_enabled(): Implicitly marking parameter $entity as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/gutenberg/gutenberg.module on line 1405

Deprecated: Drupal\gutenberg\MappingFieldsHelper::getMappedFields(): Implicitly marking parameter $template as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/gutenberg/src/MappingFieldsHelper.php on line 264

Deprecated: Drupal\gutenberg\MappingFieldsHelper::getMappedFieldsFromContent(): Implicitly marking parameter $content as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/gutenberg/src/MappingFieldsHelper.php on line 303

Deprecated: Drupal\gutenberg\Parser\BlockParser::parse(): Implicitly marking parameter $filter_callable as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/gutenberg/src/Parser/BlockParser.php on line 89

Steps to reproduce

Install the latest 4.x-dev release of the module, and you'll see the errors, I'm not sure if other versions are affected.

Proposed resolution

All the explicit nullable type in the function parameter

Remaining tasks

Testing.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇨🇦Canada danrod Ottawa

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