Problem/Motivation

PHP 8.4 has been released, and this module is triggering a "use explicit nullable type" deprecation.

This is part of Drupal's coding standards now, but since the issues to fix phpcs in this module have stalled, I'm opening up this issue to fix this single deprecation to avoid the warnings on PHP 8.4.

After updating to PHP 8.4:

FILE: /src/Form/GroupDeleteConfirm.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 34 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter:
    |         | $paragraphs_browser_type.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /src/Form/ParagraphTypeGroupsForm.php
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 79 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter: $paragraphs_type.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /src/Form/GroupEditForm.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 40 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter:
    |         | $paragraphs_browser_type.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /src/Form/ParagraphsBrowserForm.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  81 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter: $file_url_generator.
 112 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter: $field_config.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CommentFileSizeAuthor
#12 3499748.patch9.35 KBmauro_
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

krystianbrzoza created an issue. See original summary.

koustav_mondal’s picture

Assigned: Unassigned » koustav_mondal
koustav_mondal’s picture

Assigned: koustav_mondal » Unassigned
Status: Active » Needs review

Fixes were already there in previous commit, did minor changes. please review it and move to RTBC.

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

enchufe’s picture

Fixed \Drupal\paragraphs_browser\Form\ParagraphsBrowserForm explicit nullable types.

enchufe’s picture

Issue summary: View changes
keopx’s picture

Status: Needs review » Reviewed & tested by the community

It works for me

anna d’s picture

Version: 8.x-1.3 » 8.x-1.x-dev

Merge request !17 resolves the following deprecation warnings introduced after upgrading to PHP 8.4:

Deprecated: Drupal\paragraphs_browser\Form\GroupEditForm::buildForm(): Implicitly marking parameter $paragraphs_browser_type as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/paragraphs_browser/src/Form/GroupEditForm.php on line 40
PHP Deprecated: Drupal\paragraphs_browser\Form\GroupDeleteConfirm::buildForm(): Implicitly marking parameter $paragraphs_browser_type as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/paragraphs_browser/src/Form/GroupDeleteConfirm.php on line 34

Deprecated: Drupal\paragraphs_browser\Form\GroupDeleteConfirm::buildForm(): Implicitly marking parameter $paragraphs_browser_type as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/paragraphs_browser/src/Form/GroupDeleteConfirm.php on line 34
PHP Deprecated: Drupal\paragraphs_browser\Form\ParagraphTypeGroupsForm::buildForm(): Implicitly marking parameter $paragraphs_type as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/paragraphs_browser/src/Form/ParagraphTypeGroupsForm.php on line 79

Deprecated: Drupal\paragraphs_browser\Form\ParagraphTypeGroupsForm::buildForm(): Implicitly marking parameter $paragraphs_type as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/paragraphs_browser/src/Form/ParagraphTypeGroupsForm.php on line 79
PHP Deprecated: Drupal\webp\Controller\FileDownloadController::__construct(): Implicitly marking parameter $streamWrapperManager as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/webp/src/Controller/FileDownloadController.php on line 57

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

borisson_’s picture

RTBC++, please commit this.

mauro_’s picture

StatusFileSize
new9.35 KB

Just adding a stable patch link since there is no new version available yet

stijndmd’s picture

RTBC++, please commit this.

greggles’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the work and the reviews. I've merged this for now, but don't plan to make a new stable release for a while (if ever). I hope folks who need this module will consider becoming a maintainer.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.