Compatibility with oauth2-client 2.8.1

Created on 12 May 2025, about 2 months ago

Problem/Motivation

When I upgrade the library oauth2-client to the latest release: https://github.com/thephpleague/oauth2-client/releases/tag/2.8.1 I got the following error:

TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object in call_user_func_array() (line 318 of modules/contrib/odata_client/src/Odata/InputOutputService.php).
Drupal\odata_client\Odata\InputOutputService->chain() (Line: 129)
Drupal\odata_client\Odata\InputOutputService->get() (Line: 84)
Drupal\odata_client\Odata\OdataQueryBase->execute() (Line: 94)
Drupal\nsw_trustee_cpp\CrmOdataClient->loadInvoice() (Line: 99)
Drupal\nsw_trustee_cpp\Controller\CppOrderController->orderPage()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Upgrade to https://github.com/thephpleague/oauth2-client/releases/tag/2.8.1
Test your custom integration that use this module as the dependency.

Proposed resolution

Scopes should be an array, not a string.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇯🇵Japan eleonel Itoshima 🇯🇵

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024