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

quadrexdev created an issue. See original summary.

  • ace1a706 committed on 2.1.x
    #3570550 Call getBundleLabels if available
    

  • 2b3a7867 committed on 2.1.x
    #3570550 Fixing phpunit/phpstan errors/deprecations
    
quadrexdev’s picture

Status: Active » Fixed

This one:

```
Call to deprecated function node_type_get_names():
in drupal:11.3.0 and is removed from drupal:13.0.0. Use
\Drupal::service('entity_type.bundle.info')->getBundleLabels('node')
instead.
🪪 function.deprecated
```

It could stay because before Drupal 11.3, we didn't have the getBundleLabels() method in entity_type.bundle.info, and this was added conditionally:

```

if (method_exists($this->entityTypeBundleInfo, 'getBundleLabels')) {
$node_types = $this->entityTypeBundleInfo->getBundleLabels('node');
}
else {
$node_types = node_type_get_names();
}
```

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.

joegl’s picture

1) Drupal\Tests\content_access\Functional\ContentAccessAclTest::testViewAccess
Exception: 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

I don't know if the right approach to this was to change it to non-static. Form API process callbacks should be static. We were re-using this process callback downstream and are trying to figure out how to re-implement it without duplicating the code.

https://www.drupal.org/node/3548821
"Using $this as a pointer for form callback [$this, 'someMethod'] is an antipattern and should be avoided as the form will be serialized."

steven jones’s picture

Status: Closed (fixed) » Needs work

Yeah, okay, fair.

Let me pop it back as static and go from there.

  • steven jones committed 7df43563 on 2.1.x
    fix: #3570550 Resolve phpstan/phpunit deprecations and errors
    
    By: joegl...
steven jones’s picture

Status: Needs work » Fixed

That should sort it I think. Sorry about that!

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.

joegl’s picture

Awesome, thanks Stephen! Long term moving the callback to a separate file and leaving it static would probably resolve the PHPStan notice.

steven jones’s picture

I think it’s fine now, as it is in the trait?

Status: Fixed » Closed (fixed)

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