Problem/Motivation

The simplesamlphp_auth module is triggering a deprecation notice in PHP 8.4 due to implicitly marking a parameter as nullable. This needs to be addressed to ensure compatibility with future PHP versions and to follow best practices.

Steps to reproduce

  • Install simplesamlphp_auth module version 4.1.0
  • Use PHP 8.4
  • Start the application, may need to clear cache
  • Observe the following deprecation notice in the logs: Deprecated: Drupal\simplesamlphp_auth\Service\SimplesamlphpAuthManager::__construct(): Implicitly marking parameter $instance as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/www/modules/contrib/simplesamlphp_auth/src/Service/SimplesamlphpAuthManager.php on line 107

Proposed resolution

Update the constructor of the SimplesamlphpAuthManager class to explicitly declare the $instance and $config parameters as nullable

Remaining tasks

  • Create a patch with the proposed changes
  • Test the patch to ensure it resolves the deprecation notice
  • Submit the patch for review
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

lincoln-batsirayi created an issue. See original summary.

idebr’s picture

Status: Active » 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.