Created on 28 January 2025, 2 months ago

Problem/Motivation

Seeing a few minor typing errors that I'd like to try to fix.

TheNetworg\OAuth2\Client\Provider\Azure::getDefaultScopes(): Return value must be of type array, string returned

Appears to be because Azure::scope is expected to be an array of strings, but https://git.drupalcode.org/project/odata_client/-/blob/3.1.x/src/Plugin/... provides just the string "openid".

Drupal\odata_client\Odata\InputOutputService::getAccessToken(): Return value must be of type League\OAuth2\Client\Token\AccessTokenInterface, null returned

If we're going to allow for InputOutputService::getAccessToken to return null values, its return type must be nullable. I assume there's nothing in League\OAuth2\Client\Token\AccessTokenInterface that allows for an invalid or unusable token -- can't see anything in league/oauth2-client's codebase indicating as much.

Call to a member function get() on null

Not sure where this is coming from, but this occurs when I call $query->execute() after requesting query from odata_client.query. Suspect it's due to the invalid auth token -- we're still in the process of getting this set up.

Steps to reproduce

N/A

Proposed resolution

Implement typing fixes as recommended above.

Remaining tasks

Implement typing fixes.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

🇦🇺Australia geoffreyr

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