D11 compatibility

Created on 3 March 2025, 3 months ago

Problem/Motivation

I'd like to upgrade my site but Entity Limit does not support D11.

Upgrade Status module scan reports 2 issues, both usages of user_roles().

Call to deprecated function user_roles(). Deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use Drupal\user\Entity\Role::loadMultiple() and, if necessary, an inline implementation instead.
📌 Task
Status

Active

Version

3.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @karuonu
  • Merge request !4D11 compatibility fixes → (Open) created by orkut murat yılmaz
  • 🇹🇷Turkey orkut murat yılmaz Istanbul

    Can someone test and review this?

  • Tested. Unable to add role limits.

    The website encountered an unexpected error. Try again later.
    
    Error: Call to a member function getStorage() on null in Drupal\entity_limit\Plugin\EntityLimit\RoleLimit->buildConfigurationForm() (line 77 of modules/contrib/entity_limit/src/Plugin/EntityLimit/RoleLimit.php).
    

    Details

    Drupal\entity_limit\Form\EntityLimitAddLimitForm->form() (Line: 107)
    Drupal\Core\Entity\EntityForm->buildForm()
    call_user_func_array() (Line: 528)
    Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 279)
    Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult()
    call_user_func_array() (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
    Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 57)
    Drupal\advban\AdvbanMiddleware->handle() (Line: 50)
    Drupal\ban\BanMiddleware->handle() (Line: 263)
    Drupal\shield\ShieldMiddleware->bypass() (Line: 219)
    Drupal\shield\ShieldMiddleware->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
    Drupal\Core\DrupalKernel->handle() (Line: 19
    
Production build 0.71.5 2024