Drupal 11 support?

Created on 25 September 2024, about 2 months ago

I'm checking up on contrib I'm using to see what the timeline would probably be for updating a site. There is no automated drupal 11 compatability thread for this module, but running a manual scan in upgrade_status gave promising results with two automated fixes and then some twig deprecation warnings. :)

CONTRIBUTED PROJECTS
--------------------------------------------------------------------------------
Permissions by Term 3.1.33
Scanned on Tue, 09/24/2024 - 17:22.

2 errors found. 11 warnings found. Avoid some manual work by using drupal-rector
for fixing issues automatically or Upgrade Rector to generate patches.

web/modules/contrib/permissions_by_term/modules/permissions_by_entity/src/EventS
ubscriber/PermissionsByEntityKernelEventSubscriber.php:
+-----------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| status          | line | message                                                                                                                                                                                                                                             |
+-----------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Fix with
rector | 85   | Fetching deprecated class constant MASTER_REQUEST of
interface Symfony\Component\HttpKernel\HttpKernelInterface:
since symfony/http-kernel 5.3, use MAIN_REQUEST instead. To
ease the migration, this constant won't be removed until
Symfony 7.0.
 |
+-----------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
web/modules/contrib/permissions_by_term/modules/permissions_by_entity/tests/src/
Kernel/EntityAccessCheckTest.php:
+-----------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| status          | line | message                                                                                                                                                                                                                                             |
+-----------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Fix with
rector | 237  | Fetching deprecated class constant MASTER_REQUEST of
interface Symfony\Component\HttpKernel\HttpKernelInterface:
since symfony/http-kernel 5.3, use MAIN_REQUEST instead. To
ease the migration, this constant won't be removed until
Symfony 7.0.
 |
+-----------------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
web//code/vendor/symfony/deprecation-contracts/function.php:
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| status         | line | message                                                                                                                                                                                                                                          |
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Check
manually | 25   | Since twig/twig 3.12: The "tag" constructor argument of the
"Drupal\Core\Template\TwigNodeTrans" class is deprecated and
ignored (check which TokenParser class set it to "trans"),
the tag is now automatically set by the Parser when needed.
 |
| Check
manually | 25   | Since twig/twig 3.12: The "tag" constructor argument of the
"Drupal\Core\Template\TwigNodeTrans" class is deprecated and
ignored (check which TokenParser class set it to "trans"),
the tag is now automatically set by the Parser when needed.
 |
| Check
manually | 25   | Since twig/twig 3.12: The "tag" constructor argument of the
"Drupal\Core\Template\TwigNodeTrans" class is deprecated and
ignored (check which TokenParser class set it to "trans"),
the tag is now automatically set by the Parser when needed.
 |
| Check
manually | 25   | Since twig/twig 3.12: The "tag" constructor argument of the
"Drupal\Core\Template\TwigNodeTrans" class is deprecated and
ignored (check which TokenParser class set it to "trans"),
the tag is now automatically set by the Parser when needed.
 |
| Check
manually | 25   | Since twig/twig 3.12: The "tag" constructor argument of the
"Drupal\Core\Template\TwigNodeTrans" class is deprecated and
ignored (check which TokenParser class set it to "trans"),
the tag is now automatically set by the Parser when needed.
 |
| Check
manually | 25   | Since twig/twig 3.12: Getting node "filter" on a
"Twig\Node\Expression\FilterExpression" class is
deprecated.
                                                                                                                                   |
| Check
manually | 25   | Since twig/twig 3.12: Getting node "filter" on a
"Twig\Node\Expression\FilterExpression" class is
deprecated.
                                                                                                                                   |
| Check
manually | 25   | Since twig/twig 3.12: Getting node "filter" on a
"Twig\Node\Expression\FilterExpression" class is
deprecated.
                                                                                                                                   |
| Check
manually | 25   | Since twig/twig 3.12: Getting node "filter" on a
"Twig\Node\Expression\FilterExpression" class is
deprecated.
                                                                                                                                   |
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
web/modules/contrib/permissions_by_term/permissions_by_term.info.yml:
+----------------+------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| status         | line | message                                                                                                                                            |
+----------------+------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| Check
manually | 9    | Value of core_version_requirement: ^9.1 | ^10 is not
compatible with the next major version of Drupal core. See
https://drupal.org/node/3070687.
 |
+----------------+------+----------------------------------------------------------------------------------------------------------------------------------------------------+
web/modules/contrib/permissions_by_term/modules/permissions_by_entity/permission
s_by_entity.info.yml:
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+
| status         | line | message                                                                                                                                          |
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+
| Check
manually | 4    | Value of core_version_requirement: ^9 | ^10 is not
compatible with the next major version of Drupal core. See
https://drupal.org/node/3070687.
 |
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+
Feature request
Status

Active

Version

3.1

Component

Code

Created by

🇺🇸United States erutan

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

Comments & Activities

  • Issue created by @erutan
  • 🇮🇳India Rajan Kumar@2026

    Hi,

    I have fixed the issue with Drupal 11 support and created a patch. I have attached a screenshot for reference. Thank you !

  • First commit to issue fork.
  • 🇺🇸United States bradallenfisher

    The website encountered an unexpected error. Try again later.

    TypeError: Drupal\permissions_by_term\Service\AccessCheck::__construct(): Argument #2 ($eventDispatcher) must be of type Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher, Symfony\Component\EventDispatcher\EventDispatcher given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\permissions_by_term\Service\AccessCheck->__construct() (line 81 of modules/contrib/permissions_by_term/src/Service/AccessCheck.php).
    Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
    Drupal\Component\DependencyInjection\Container->get() (Line: 430)
    Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 237)
    Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
    Drupal\Component\DependencyInjection\Container->get() (Line: 454)
    Drupal\Component\DependencyInjection\Container->Drupal\Component\DependencyInjection\{closure}() (Line: 243)
    Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 159)
    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: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->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)

    after applying patch and clearing cache

  • 🇺🇸United States mark_fullmer Tucson
  • 🇬🇧United Kingdom somersoft

    @bradallenfisher.
    Please can you check how the patch is applied as looking at the issue fork diff the second parameter is changed to have the correct class.

    That change is not in the patch uploaded in #2.

    Alternative installation of the code if this issue fork repository can be used directly, by adding the following to the project's composer.json

    "repositories": [
    {
    "type": "vcs",
    "url": "https://git.drupalcode.org/issue/permissions_by_term-3476575.git"
    }
    ],

    and

    "require": {
    "drupal/permissions_by_term": "dev-3.1.x-dev",
    }

    then composer can create a compatible set of packages.

Production build 0.71.5 2024