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.
|
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------------+
Comments
Comment #2
rajan kumar@2026 commentedHi,
I have fixed the issue with Drupal 11 support and created a patch. I have attached a screenshot for reference. Thank you !
Comment #4
bradallenfisher commentedThe 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
Comment #5
mark_fullmerComment #6
somersoft commented@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
and
then composer can create a compatible set of packages.
Comment #9
jepster_Comment #10
jepster_@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?
Comment #24
jepster_Created release 3.1.35 which is now supporting Drupal 11.
Comment #25
jepster_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.
Comment #27
marcoliverJust 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!