Problem/Motivation

Running drupal-check on 4.1 and 4.x with the -d option returns:

 ------ ---------------------------------------------------------------------
  Line   src/Service/SimplesamlphpAuthManager.php
 ------ ---------------------------------------------------------------------
  107    Deprecated in PHP 8.4: Parameter #7 $instance
         (SimpleSAML\Auth\Simple) is implicitly nullable via default value
         null.
  107    Deprecated in PHP 8.4: Parameter #8 $config
         (SimpleSAML\Configuration) is implicitly nullable via default value
         null.
  183    Call to an undefined method
         Drupal\Core\Session\AccountInterface::isAdminRoute().

Steps to reproduce

In a PhP 8.4 site run drupal-check with the -d option.

Proposed resolution

Add ? in front of the parameter classes and fix the bad call to tell if it is an admin route.

Remaining tasks

Write patch

User interface changes

API changes

Data model changes

Comments

cgmonroe created an issue. See original summary.

cgmonroe’s picture

Status: Active » Needs review
StatusFileSize
new1.57 KB

Here's a patch that fixes these problems. Technically the admin context service should be injected but this is rarely called code so it's probably ok to just get the service when needed.

idebr’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#3401289: Fix linting errors on gitlab CI

This fix is included in #3401289: Fix linting errors on gitlab CI. I'll close this issue as a duplicate

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.