With PHP 8.4 I'm getting:

Deprecated: Drupal\paragraphs\ParagraphsConversionManager::getApplicableDefinitions(): Implicitly marking parameter $allowed_types as nullable is deprecated, the explicit nullable type must be used instead in web/modules/contrib/paragraphs/src/ParagraphsConversionManager.php on line 68
Deprecated: Drupal\paragraphs\ParagraphsConversionManager::isApplicable(): Implicitly marking parameter $allowed_types as nullable is deprecated, the explicit nullable type must be used instead in web/modules/contrib/paragraphs/src/ParagraphsConversionManager.php on line 94
Deprecated: Drupal\paragraphs\ParagraphsConversionManager::supportsConversion(): Implicitly marking parameter $allowed_types as nullable is deprecated, the explicit nullable type must be used instead in web/modules/contrib/paragraphs/src/ParagraphsConversionManager.php on line 137
Deprecated: Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget::getAllowedTypes(): Implicitly marking parameter $field_definition as nullable is deprecated, the explicit nullable type must be used instead in web/modules/contrib/paragraphs/src/Plugin/Field/FieldWidget/ParagraphsWidget.php on line 1244
Deprecated: Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget::getChildParagraphs(): Implicitly marking parameter $paragraph as nullable is deprecated, the explicit nullable type must be used instead in web/modules/contrib/paragraphs/src/Plugin/Field/FieldWidget/ParagraphsWidget.php on line 1527
Deprecated: Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget::buildNestedParagraphsFoDragDrop(): Implicitly marking parameter $paragraph as nullable is deprecated, the explicit nullable type must be used instead in web/modules/contrib/paragraphs/src/Plugin/Field/FieldWidget/ParagraphsWidget.php on line 1586
Deprecated: {closure:Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget::reorderParagraphs():2343}(): Implicitly marking parameter $parent_entity as nullable is deprecated, the explicit nullable type must be used instead in web/modules/contrib/paragraphs/src/Plugin/Field/FieldWidget/ParagraphsWidget.php on line 2343

Issue fork paragraphs-3500847

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:

Comments

claudiu.cristea created an issue. See original summary.

divyansh.gupta’s picture

Assigned: Unassigned » divyansh.gupta

Working on it.

divyansh.gupta’s picture

Assigned: divyansh.gupta » Unassigned
Status: Active » Needs review

I have made changes to remove implicitly parameters as nullable error on PHP8.4.
Please review.

claudiu.cristea’s picture

Status: Needs review » Needs work

Thank you, @divyansh.gupta

But now we need to run tests also with PHP 8.4 in pipeline. Let's start by adding OPT_IN_TEST_MAX_PHP: 1 under variables: in https://git.drupalcode.org/project/paragraphs/-/blob/8.x-1.x/.gitlab-ci.yml

divyansh.gupta’s picture

Assigned: Unassigned » divyansh.gupta
divyansh.gupta’s picture

Assigned: divyansh.gupta » Unassigned
Status: Needs work » Needs review

@claudiu.cristea, Added it in the Gitlab-Ci file.
Please review.

claudiu.cristea’s picture

Title: Implicitly marking parameter as nullable is deprecated » [PHP 8.4] Implicitly marking parameter as nullable is deprecated
Status: Needs review » Needs work

Thank you. I see the PHP 8.4 phpunit test is failing

divyansh.gupta’s picture

Assigned: Unassigned » divyansh.gupta

ok will work on those and make the test pass.

divyansh.gupta’s picture

Assigned: divyansh.gupta » Unassigned
Status: Needs work » Needs review

@claudiu.cristea
I have looked all the errors in the pipeline most of them are related to contrib or core files and there are no errors related to paragraph module files,
Please review.

berdir’s picture

Status: Needs review » Closed (duplicate)

There's an older, existing issue, please ensure that covers the same changes: #3492419: Nullable types must be explicit