Call to getCredentialProvider() on null

Created on 3 May 2023, about 1 year ago
Updated 4 May 2023, about 1 year ago

Problem/Motivation

[error] Error: Call to a member function getCredentialProvider() on null in Drupal\oauth2_client\Service\CredentialProvider->getCredentialDependencyName() (line 74 of /var/www/html/docroot/modules/contrib/oauth2_client/src/Service/CredentialProvider.php)

Steps to reproduce

Migrate existing plugin config from 3.x

These lines create the plugins, but they have not yet been saved

  // Discovery auto-generates needed config entities.
  $plugins = $manager->getDefinitions();

So the utility method cannot get the dependency name, which also hasn't been set at this point in the migration.

Proposed resolution

Return the default null value if the plugin does not load.

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States FatherShawn New York

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024