Make Social Auth Mailru compatible with Social Auth 3.x

Created on 11 December 2019, almost 5 years ago
Updated 6 June 2023, over 1 year ago

I got this error using "drupal-check" command.

$ drupal-check /c/Bitnami/drupal-8.7.10-0/apps/drupal/htdocs/modules/contrib/social_auth_mailru
 2/7 [========>-------------------]  28%PHP Fatal error:  Declaration of Drupal\social_auth_mailru\MailruAuthManager::getExtraDetails($url) must be compatible with Drupal\social_auth\AuthManager\OAuth2Manager::getExtraDetails($method = 'GET', $domain = NULL) in C:\Bitnami\drupal-8.7.10-0\apps\drupal\htdocs\modules\contrib\social_auth_mailru\src\MailruAuthManager.php on line 15

In MailruAuthManager.php there is passed "$url" argument to getExtraDetails function, but in OAuth2Manager.php in social_auth module, function is built like this getExtraDetails($method = 'GET', $domain = NULL), so arguments are not matching.
When I've commented these lines, I got another error:

$ drupal-check /c/Bitnami/drupal-8.7.10-0/apps/drupal/htdocs/modules/contrib/social_auth_mailru
 2/7 [========>-------------------]  28%PHP Fatal error:  Class Drupal\social_auth_mailru\MailruAuthManager contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Drupal\social_api\AuthManager\OAuth2ManagerInterface::getAuthorizationUrl, Drupal\social_auth\AuthManager\OAuth2ManagerInterface::requestEndPoint) in C:\Bitnami\drupal-8.7.10-0\apps\drupal\htdocs\modules\contrib\social_auth_mailru\src\MailruAuthManager.php on line 15

I think that social_auth_mailru is wrong implemented with social_auth module.

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇵🇱Poland agrochal

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024