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.
 |
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+
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

erutan created an issue. See original summary.

rajan kumar@2026’s picture

Status: Active » Needs review
StatusFileSize
new17.1 KB
new3.37 KB

Hi,

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

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

bradallenfisher’s picture

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

mark_fullmer’s picture

Status: Needs review » Needs work
somersoft’s picture

@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.

peter majmesku made their first commit to this issue’s fork.

jepster_’s picture

Status: Needs work » Active
jepster_’s picture

@somersoft, mark_fullmer, erutan, bradallenfisher:

I’ve made several changes, and the module is now installable on Drupal 11. I conducted a few tests, and everything worked as expected. However, I’m not finished yet. Could you please do some testing and provide feedback in the meantime?

  • peter majmesku committed 9409973f on 3.1.x-dev
    #3476575: Use the correct interface in AccessCheck service, for not...

  • peter majmesku committed 6a4aec08 on 3.1.x-dev
    #3476575: Removed not used variable. Sinced PHPSTAN level in GitLab CI...

  • 380deb4f committed on 3.1.x-dev
    Drupal issue #3476575 Drupal 11 support?
    Drupal\Component\...

  • 103ec0d4 committed on 3.1.x-dev
    Drupal issue #3476575 Drupal 11 support?
    Drupal\Component\...

  • ec3c560b committed on 3.1.x-dev
    Drupal issue #3476575 Drupal 11 support?
    Drupal\Component\...

  • 427a964b committed on 3.1.x-dev
    Drupal issue #3476575 Drupal 11 support?
    Correct the name.
    

  • 4d896f3c committed on 3.1.x-dev
    Drupal issue #3476575 Drupal 11 support?
    https://www.drupal.org/project/...
jepster_’s picture

Version: 3.1.33 » 3.1.35
Status: Active » Fixed

Created release 3.1.35 which is now supporting Drupal 11.

jepster_’s picture

Please do me a favor and test the latest patch release. Feel free to re-open this issue, if you stumble upon any Drupal 11 related issues.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

marcoliver’s picture

Just chiming in real quick to let you know that I just spent about an hour with the new release and it looks good!

I did not encounter anything unexpected on either D10 or D11! Thanks!