- Issue created by @wlc13
- First commit to issue fork.
- Merge request !14fixed : Implicitly marking parameter $module_handler as nullable is deprecated → (Open) created by Unnamed author
Updating to PHP 8.4, I got a WSOD with the notice:
PHP Deprecated: Drupal\menu_item_role_access\MenuItemRoleAccessLinkTreeManipulator::__construct(): Implicitly marking parameter $module_handler as nullable is deprecated, the explicit nullable type must be used instead in X:\xxx\xxxx\web\modules\contrib\menu_item_role_access\src\MenuItemRoleAccessLinkTreeManipulator.php on line 53
After prepending a ? to ModuleHandlerInterface to make it explicitly nullable, I get another WSOD with the notice:
PHP Deprecated: Drupal\menu_item_role_access\MenuItemRoleAccessLinkTreeManipulator::__construct(): Optional parameter $module_handler declared before required parameter $entity_repository is implicitly treated as a required parameter in X:\xxx\xxxx\web\modules\contrib\menu_item_role_access\src\MenuItemRoleAccessLinkTreeManipulator.php on line 53
After rearranging the parameters so that the optional parameter $module_handler is at the end of the list, I get another WSOD with the following:
Uncaught PHP Exception TypeError: "Drupal\menu_item_role_access\MenuItemRoleAccessLinkTreeManipulator::__construct(): Argument #4 ($config_manager) must be of type Drupal\Core\Config\ConfigManagerInterface, Drupal\Core\Extension\ModuleHandler given, called in X:\xxx\xxxx\web\core\lib\Drupal\Component\DependencyInjection\Container.php on line 261" at C:\Web_Projects\oar-mosaic-as-a-service\web\modules\contrib\menu_item_role_access\src\MenuItemRoleAccessLinkTreeManipulator.php line 53.
Argument #4 is $config_manager, and ModuleHandler is at the end of the list.
See above.
Active
2.4
Code