I noticed an error was produced when checking for coding standard violations:
phpcs --standard=DrupalPractice .
FILE: /var/www/html/drupal2/social_auth_github/src/GitHubAuthManager.php
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
33 | ERROR | The $_GET super global must not be accessed directly; inject the request.stack
| | service and use $stack->getCurrentRequest()->query->get('code') instead
----------------------------------------------------------------------------------------------------
Time: 82ms; Memory: 6MB
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | social_auth_github-fix-coding-standards-3105242-4.patch | 2.17 KB | neel24 |
| #2 | social_auth_github-fix-coding-standards-3105242-2.patch | 2.15 KB | neel24 |
Comments
Comment #2
neel24 commentedI've created a patch to fix the error.
Comment #3
agrochal commentedYou use the wrong way to implement request service inside construct function, check this issue: https://www.drupal.org/project/social_auth_google/issues/3109038
Comment #4
neel24 commentedMy bad, the OAuth2Manager in Social Api had been updated and I was still using an older version, hence that's why the previous request was still working for me. I've updated the patch to fix the coding standards and updated the request.
Comment #5
neel24 commentedComment #6
wellsThanks, @neel24. This was committed to the 3.x branch with credit to you -- not sure why the commit didn't show up here but maybe it will later (: