After introducing https://www.drupal.org/project/oauth2_client/issues/3040837 there is an issue in ClientTestForm when using an array as scopes definition. In this form the current configuration is displayed but if you use an array in the annotation you receive the following error:
Notice: Array to string conversion in Drupal\oauth2_client\Form\ClientTestForm->Drupal\oauth2_client\Form\{closure}() (line 195 of modules/contrib/oauth2_client/src/Form/ClientTestForm.php).
Drupal\oauth2_client\Form\ClientTestForm->Drupal\oauth2_client\Form\{closure}(Array, 'scopes')
Additionally the README.md file should be updated with the new scope information:
- the syntax for using an array in annotations is '{}' instead of '[]'
- description for scopes and scope_separator should be added
I'll provide a first fix version today.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | array_to_string_conversion-3101522-3.patch | 1.86 KB | sfuchsbe |
| #2 | array_to_string_conversion-3101522-2.patch | 1.85 KB | sfuchsbe |
Comments
Comment #2
sfuchsbe commentedComment #3
sfuchsbe commentedRework for 8.x-2.0-beta3
Comment #4
guillaumeduveau(edit)
Comment #5
guillaumeduveauActually, the patch does not apply to latest dev any more. It does fix the PHP notice however, although I didn't test scopes. Also, I'm not sure the comments on scopes are that necessary.
Comment #6
fathershawnWe are replacing this form in #3187565: Key module integration
Comment #7
fathershawnI used the README update in the patch in #3163585: Drupal 9 roadmap and credited @sfuchsbe in that issue