Problem/Motivation

After upgrading from php 8.3 to php 8.5 the following warning were logged when clicking on the Access control tab:
Deprecated function: Calling static trait method Drupal\content_access\Form\ContentAccessRoleBasedFormTrait::disableCheckboxes is deprecated, it should only be called on a class using the trait in Drupal\Core\Form\FormBuilder->doBuildForm() (line 1065 of /var/www/html/core/lib/Drupal/Core/Form/FormBuilder.php)

Steps to reproduce

Upgrade to php 8.5 and click on the Access control tab.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

admin@baysidebush.org.au’s picture

Oops sorry, but Calling static trait method was deprecated I think with php 8.1. I just hadn't notice the warning message. I'm not sure when it will become an error.

sergiu_’s picture

Hi,

It became an error after upgrading to Drupal 11.3.1

Local patch:

diff --git a/src/Form/ContentAccessRoleBasedFormTrait.php b/src/Form/ContentAccessRoleBasedFormTrait.php
--- a/src/Form/ContentAccessRoleBasedFormTrait.php
+++ b/src/Form/ContentAccessRoleBasedFormTrait.php
@@ -66,1 +66,1 @@
-          '\Drupal\content_access\Form\ContentAccessRoleBasedFormTrait',
+          $this,

joao.ramos.costa made their first commit to this issue’s fork.

joao.ramos.costa’s picture

StatusFileSize
new1.02 KB

Here's a patch from MR I opened before,

Cheers.

joao.ramos.costa’s picture

Status: Active » Needs review
joao.ramos.costa’s picture

StatusFileSize
new1.02 KB
quadrexdev’s picture

Version: 2.1.0-rc1 » 2.1.x-dev

Issues should be pointing to latest dev release

quadrexdev’s picture

Status: Needs review » Fixed

Merged to 2.1.x

Thanks, all!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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