- Issue created by @mandclu
I have reviewed and tested the proposed patch (!12) on my local Drupal 11 environment. The fatal error caused by the deprecated
Url::toRenderArray(
) method has been successfully resolved.The patch introduces a new
urlToRenderArray()
method within theMenuLinkConfigForm
class, which prepares the renderable array manually. Instead of directly calling the deprecated method, it now checks access for the entityβs edit-form URL and builds the render array using #url and #options properties. This ensures compatibility with Drupal 11βs updated API and follows current best practices for rendering links.After applying the patch, I was able to add a config link to a menu without encountering any errors. Everything works as expected.
Thank you for the fix!
Tested with:
Drupal 11.2-dev
PHP 8.3.14
Fresh install of menu_link_config module
Marking as Reviewed and Tested.