Remove any deprecated code for Drupal 9 readiness.


drupal-check results:

5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
  Line   nodeaccess.module                                                                                                                                                                   
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
  72     Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or          
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.                                                                                                                                   
  72     Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or  
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.                                                                                                                               
  75     Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or          
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.                                                                                                                                   
  76     Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or          
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.                                                                                                                                   
  80     Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or  
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.                                                                                                                               
  81     Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or  
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.                                                                                                                               
  233    Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or          
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.                                                                                                                                   
  233    Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or  
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.                                                                                                                               
  234    Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or          
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.                                                                                                                                   
  235    Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or  
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.                                                                                                                               
  236    Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or          
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.                                                                                                                                   
  241    Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or  
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.                                                                                                                               
  272    Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or          
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.                                                                                                                                   
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 

 ------ ------------------------------------------------------------------------- 
  Line   src/Form/GrantsForm.php                                                  
 ------ ------------------------------------------------------------------------- 
  44     Call to deprecated function db_query():                                  
         as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get        
         a database connection injected into your service from the container and  
         call query() on it. For example,                                         
  69     Call to deprecated function db_query():                                  
         as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get        
         a database connection injected into your service from the container and  
         call query() on it. For example,                                         
  99     Call to deprecated function db_query():                                  
         as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get        
         a database connection injected into your service from the container and  
         call query() on it. For example,                                         
  333    Call to deprecated function db_insert():                                 
         as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get        
         a database connection injected into your service from the container and  
         call insert() on it. For example,                                        
  345    Call to deprecated function drupal_set_message():                        
         in Drupal 8.5.0 and will be removed before Drupal 9.0.0.                 
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.     
 ------ ------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 18 errors                                                                                                
                                                                                                                        

Comments

Coops_ created an issue. See original summary.

Coops_’s picture

StatusFileSize
new9.86 KB
alison’s picture

Issue summary: View changes

Add drupal-check results.

alison’s picture

Status: Needs review » Needs work

Hi @Coops_ -- thank you so very much for doing this check and submitting a patch!

I'd like to split out the changes related to D9 deprecated code from the changes that aren't -- after skimming the patch, my impression is that the changes that aren't specifically for addressing D9 deprecated code are all to fix coding standards issues, is that accurate, or? If that's accurate, if that's all the other changes are, could you please create a separate issue with the coding standards changes, and submit a new version of this patch with just the D9 deprecated code fixes?

Please lmk if you have any questions, or if I've misunderstood your patch. Thanks!

swatichouhan012’s picture

Status: Needs work » Needs review
StatusFileSize
new8.77 KB
new333.99 KB

@alisonjo315 Here is new patch to fix deprecated code, kindly review.

alison’s picture

StatusFileSize
new8.99 KB

Thank you @swatichouhan012, and thanks for including the updated report!

Pardon my ignorance -- does it need a replacement for services.yml, i.e. nodeaccess.services.yml, or?

(interdiff attached, for "posterity or whatever" 😁)

john cook’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll, +Novice

I've tried to have a look at this patch but it currently doesn't apply because of some work done in Node access roles will save, but per user still need hammering. Committing tonight's work, so this patch needs a reroll.

Because of this, I've changed the status back to Needs work as well as adding the Needs reroll and Novice tags.

suresh prabhu parkala’s picture

Status: Needs work » Needs review
StatusFileSize
new10.13 KB

Re-rolled patch please review.

drupal.ninja03’s picture

Status: Needs review » Reviewed & tested by the community

Patch from #8 is working.

Looks good to me!

 5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


 [OK] No errors
Hitby’s picture

When I apply the patch in #8 to the dev release (on a D9.0.5 site) I get a WSOD when attempting to change the grants on a node. I get the following error -

Error: Call to undefined method Drupal\Core\Database\Driver\mysql\Connection::getConnection() in Drupal\nodeaccess\Form\GrantsForm->buildForm() (line 99 of /home/oa/web/modules/contrib/nodeaccess/src/Form/GrantsForm.php)
#0 [internal function]: Drupal\nodeaccess\Form\GrantsForm->buildForm(Array, Object(Drupal\Core\Form\FormState), Object(Drupal\node\Entity\Node))
#1 /home/oa/web/core/lib/Drupal/Core/Form/FormBuilder.php(532): call_user_func_array(Array, Array)
#2 /home/oa/web/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm('nodeaccess_gran...', Object(Drupal\Core\Form\FormState))
#3 /home/oa/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\nodeaccess\Form\GrantsForm), Object(Drupal\Core\Form\FormState))
#4 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#5 /home/oa/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#6 /home/oa/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#7 /home/oa/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#8 /home/oa/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#9 /home/oa/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#10 /home/oa/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#11 /home/oa/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /home/oa/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /home/oa/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /home/oa/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /home/oa/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /home/oa/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /home/oa/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /home/oa/web/core/lib/Drupal/Core/DrupalKernel.php(705): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /home/oa/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#20 {main}

I'd really appreciate any help with this.
Thanks,
Dan

waspper’s picture

StatusFileSize
new9.98 KB
new3.65 KB

Hello guys.

I confirm bug mentioned at #10. It's because database connection is now added with dependency injection. Therefore, method "getConnection" is not needed/available. Attaching patch to fix this issue.

waspper’s picture

Status: Reviewed & tested by the community » Needs review
andypost’s picture

+++ b/src/Form/GrantsForm.php
@@ -164,10 +164,10 @@ class GrantsForm extends FormBase {
-        if (strstr($this->db->getConnection()->version(), 'MariaDB') !== FALSE) {
+        if (strstr($this->db->version(), 'MariaDB') !== FALSE) {
...
-        elseif (strstr($this->db->getConnection()->clientVersion(), 'PostgreSQL') !== FALSE) {
+        elseif (strstr($this->db->clientVersion(), 'PostgreSQL') !== FALSE) {

There's now contrib drivers, so makes sense to keep it compatible, ref https://www.drupal.org/project/mysql56
Guess it needs to check other property of driver, also needs check with sqlite

andypost’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll
+++ b/src/Form/GrantsForm.php
@@ -3,15 +3,70 @@
+  public function __construct(Connection $db, Messenger $messenger, EntityTypeManager $entityTypeManager, ConfigFactory $configFactory) {
+    $this->db = $db;
+    $this->messenger = $messenger;
+    $this->entityTypeManager = $entityTypeManager;
+    $this->configFactory = $configFactory;
+  }
...
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('database'),
+      $container->get('messenger'),
+      $container->get('entity_type.manager'),
+      $container->get('config.factory')

It should use backward compatible approach https://git.drupalcode.org/project/drupal/-/blob/9.0.x/core/modules/upda...

ankithashetty’s picture

Status: Needs work » Needs review
StatusFileSize
new9.43 KB
new2.78 KB

Updated the patch in #11 with the suggestions specified by #14 and made a couple of changes. Attaching an interdiff as well, will be easier to track the diffrence between the patches...

Thank you!

waspper’s picture

StatusFileSize
new9.51 KB
new551 bytes

After checking a bit, and keeping in mind grants are taken once node is saved (what I saw, let us know if there is another way), I've added a small line to save node when grants form is submitted. This way, permissions per node are taken successfully (resolving issue at https://www.drupal.org/project/nodeaccess/issues/3169639). Attaching updated patch with this small change. Feel free to discuss/improve/change.

andypost’s picture

I suggest to commit #15 as #16 is out if scope and already has own issue which needs tests coverage as node "knows" its grants

waspper’s picture

Well. Then let's keep #15. I'll provide small fix into the other issue, including one to work after applying #15.

waspper’s picture

StatusFileSize
new9.43 KB
new10.46 KB

One more attempt: After playing with config_inspector, int's needed to do some changes to make it to pass. Feel free to improve/comment this new patch.

waspper’s picture

StatusFileSize
new19.63 KB
new10.46 KB

Sorry. Attached wrong patch. Here the good one.

waspper’s picture

andypost’s picture

  1. +++ b/config/schema/nodeaccess.schema.yml
    @@ -0,0 +1,71 @@
    +nodeaccess.settings:
    +  type: config_object
    ...
    +  mapping:
    +    grants:
    +      type: config_object
    

    any reason to embed config into config?
    It looks like a bug

  2. +++ b/config/schema/nodeaccess.schema.yml
    @@ -0,0 +1,71 @@
    +          show:
    +            type: integer
    ...
    +                grant_view:
    +                  type: integer
    ...
    +                grant_update:
    +                  type: integer
    ...
    +                grant_delete:
    +                  type: integer
    ...
    +          allow:
    +            type: integer
    +            label: 'Allow'
    

    This properties looks like boolean

  3. +++ b/config/schema/nodeaccess.schema.yml
    @@ -0,0 +1,71 @@
    +      sequence:
    +        type: integer
    +        label: 'Role ID'
    

    role ID is string, so int is confusing

  4. +++ /dev/null
    @@ -1,5 +0,0 @@
    -  nodeaccess.access_checker:
    -      class: Drupal\nodeaccess\AccessChecks\NodeGrantAccessCheck
    
    +++ b/src/AccessChecks/NodeGrantAccessCheck.php
    @@ -24,8 +24,12 @@ class NodeGrantAccessCheck implements AccessInterface {
    -    if ($node && isset($allowed_types[$node->getType()]) && !empty($allowed_types[$node->getType()]) &&
    -        ($account->hasPermission('grant node permissions') || $account->hasPermission('administer nodeaccess'))) {
    +    if (
    +      $node &&
    +      isset($allowed_types[$node->getType()]) &&
    

    why that removed? class still here

  5. +++ b/src/Form/ConfigForm.php
    @@ -147,7 +147,7 @@ class ConfigForm extends ConfigFormBase {
    +        '#default_value' => isset($allowed_types[$type]) && isset($allowed_types[$type]['show']) ? $allowed_types[$type]['show'] : 0,
    
    @@ -175,21 +175,21 @@ class ConfigForm extends ConfigFormBase {
    +          '#default_value' => isset($user_perms['_author']['grant_view']) ? $user_perms['_author']['grant_view'] : 0,
    ...
    +          '#default_value' => isset($user_perms['_author']['grant_update']) ? $user_perms['_author']['grant_update'] : 0,
    ...
    +          '#default_value' => isset($user_perms['_author']['grant_delete']) ? $user_perms['_author']['grant_delete'] : 0,
    

    Since PHP 7.0 is minimal version, please use https://www.php.net/manual/en/migration70.new-features.php#migration70.n... as core already doing

waspper’s picture

StatusFileSize
new19.72 KB
new10.55 KB

Updated patch, to fix minor issue.

waspper’s picture

StatusFileSize
new20.37 KB
new10.56 KB

Well, I've addressed some items in #22:

1. Updated.
2. Updated.
3. Well. It's not the "machine name". It's storing the numeric ID. Not too clear yet purpose of this. Maybe this could be deleted, but needed more tests.
4. Previously deleted. Seems not needed, because it was only into a "services.yml". Maybe class is needed for later processing?
5. Updated.

jungle’s picture

StatusFileSize
new3.06 KB

Some changes in #24 are out of scope to me.

  • The attached patch fixed calls to deprecated constant DRUPAL_ANONYMOUS_RID and calls to deprecated constant DRUPAL_AUTHENTICATED_RID only
  • Deprecated function calls in GrantsForm were fixed already
alison’s picture

#25 clears all deprecated code issues flagged by upgrade_status.

If someone has time to re-run drupal-check just to be excessively confident about these fixes, that would be cool -- or even just if we could get one more "yep worked for me" -- bonus points if you can confirm that #10 isn't still happening! (or if you can confirm that it's an unrelated issue, nothing to do with the deprecation fixes)

-------
Otherwise, I'm giving it another 1-2 weeks to sit here, and then I'll approve/merge/release. (So if you want it to be merged/released sooner, please help test!!)

jungle’s picture

Status: Needs review » Reviewed & tested by the community

@alisonjo315, I checked myself with the patch in #25. #10 is out of scope here as the issue title indicated, it's related to #3061378: Table name typo? or #3185156: Permission to individual Users throws error on grants tab of nodes probably, or let's do it in another new issue.

$ ../vendor/bin/drupal-check --version
Drupal Check 1.1.10
$ composer show drupal/core
name     : drupal/core
descrip. : Drupal is an open source content management platform powering millions of websites and applications.
keywords :
versions : * 8.9.19

Before:


$ ../vendor/bin/drupal-check -d modules/contrib/nodeaccess/
 5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ---------------------------------------------------------------------
  Line   nodeaccess.module
 ------ ---------------------------------------------------------------------
  72     Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.
  72     Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.
  75     Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.
  76     Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.
  80     Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.
  81     Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.
  233    Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.
  233    Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.
  234    Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.
  235    Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.
  236    Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.
  241    Call to deprecated constant DRUPAL_AUTHENTICATED_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or
         \Drupal\user\RoleInterface::AUTHENTICATED_ID instead.
  272    Call to deprecated constant DRUPAL_ANONYMOUS_RID: Deprecated in
         drupal:8.0.0 and is removed from drupal:9.0.0. Use
         Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or
         \Drupal\user\RoleInterface::ANONYMOUS_ID instead.
 ------ ---------------------------------------------------------------------

 [ERROR] Found 13 errors

After:

$ ../vendor/bin/drupal-check -d modules/contrib/nodeaccess/
 5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


 [OK] No errors

  • jungle committed 07a3fde on 8.x-1.x
    Issue #3070372 by waspper, Coops_, ankithashetty, swatichouhan012,...
jungle’s picture

Status: Reviewed & tested by the community » Fixed

Let's move forward.

Thanks!

Status: Fixed » Closed (fixed)

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