Problem/Motivation

Using the module with PHP 8.4 produces the deprecation error -

PHP Deprecated: Drupal\tb_megamenu\Controller\TBMegaMenuAdminController::saveError(): Implicitly marking parameter $menu_name as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/docroot/modules/contrib/tb_megamenu/src/Controller/TBMegaMenuAdminController.php on line 223

PHP Deprecated: Drupal\tb_megamenu\Controller\TBMegaMenuAdminController::saveError(): Implicitly marking parameter $theme as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/docroot/modules/contrib/tb_megamenu/src/Controller/TBMegaMenuAdminController.php on line 223

PHP Deprecated: Drupal\tb_megamenu\Controller\TBMegaMenuAdminController::saveError(): Implicitly marking parameter $block_config as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/docroot/modules/contrib/tb_megamenu/src/Controller/TBMegaMenuAdminController.php on line 223

PHP Deprecated: Drupal\tb_megamenu\Controller\TBMegaMenuAdminController::saveError(): Implicitly marking parameter $menu_config as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/docroot/modules/contrib/tb_megamenu/src/Controller/TBMegaMenuAdminController.php on line 223

CommentFileSizeAuthor
#2 php8.4-deprecation-3568717-2.patch761 bytesshani maurya
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

shani maurya created an issue. See original summary.

shani maurya’s picture

StatusFileSize
new761 bytes

Created patch for 8.x-1.10 version, it has been copied from the 3.0 version issue https://www.drupal.org/project/tb_megamenu/issues/3498217

shani maurya’s picture

Title: Deprecation error on PHP 8.4 » Deprecation error on PHP 8.4 for 8.x-1.10 version

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

rbrownell’s picture

Status: Active » Needs review

Thanks for the patch, @shani-maurya.

I’ve reviewed it and opened a merge request including this change. It’s now awaiting review.

liam morland’s picture

Version: 8.x-1.10 » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community
Issue tags: +PHP 8.4

This is the correct fix.