Problem/Motivation
Hello project maintainers,
This is an automated issue to help make this module compatible with Drupal 11.
Changes will periodically be added to this issue that remove deprecated API uses. To stop further changes from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD11" tag from the issue to stop the bot from posting updates.
The changes will be posted by the Project Update Bot official user account. This account will not receive any issue credit contributions for itself or any company.
Proposed resolution
You have a few options for how to use this issue:
- Accept automated changes until this issue is closed
If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD11" tag is left on this issue, new changes will be posted periodically if new deprecation fixes are needed.
As the Drupal Rector project improves and is able to fix more deprecated API uses, the changes posted here will cover more of the deprecated API uses in the module.
Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot changes. The bot will still post new changes then if there is a change in the new generated patch compared to the changes that the bot posted last. Those changes are then up to humans to integrate.
- Leave open but stop new automated changes.
If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated changes, remove the "ProjectUpdateBotD11" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated changes again, add back the "ProjectUpdateBotD11" tag.
- Close it and don't use it
If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated changes will be posted here.
If the issue is reopened, then new automated changes will be posted.
If you are using another issue(s) to work on Drupal 11 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.
Remaining tasks
Using the patches
- Apply the latest patch in the comments by Project Update Bot or human contributors that made it better.
- Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
- Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.
Using the merge request
- Review the merge request and test it.
- Thoroughly test the changes. These changes are automatically generated so they haven't been tested manually or automatically.
- Provide feedback about how the testing went. If you can improve the merge request, create a new branch and merge request and work from there.
Warning: The 'project-update-bot-only' branch will always be overwritten. Do not work in that branch!
Providing feedback
If there are problems with one of the changes posted by the Project Update Bot, such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue. For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue.
| Comment | File | Size | Author |
|---|
Issue fork openid_connect-3433705
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
project update bot commentedThis is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module, even with these changes, this module is not yet compatible with Drupal 11.
Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.
Therefore these changes did not update the
info.ymlfile for Drupal 11 compatibility.The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.
Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug information
These packages were used to generate the fixes:
Comment #4
john franklin commentedThere is one patch from Project Update Bot to replace a call to
file_save_data()that is already in the 3.x branch. The other items cited are deprecations against OpenID Connect itself. Near as I can tell, all that needs to be done to be Drupal 11 ready is to tag this module as such in the .info.yml file. (So far as we can tell at the Drupal 11.0-alpha1 point, anyway.)Comment #5
project update bot commentedThis is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module, even with these changes, this module is not yet compatible with Drupal 11.
Currently Drupal Rector, version 0.20.3, cannot fix all Drupal 11 compatibility problems.
Therefore, these changes did not update the
info.ymlfile for Drupal 11 compatibility.The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.
Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug information
These packages were used to generate the fixes:
Comment #6
solideogloria commentedTarget 3.x, as that's the branch that would support D11
Comment #11
acbramley commentedI've rolled updates against 3.x and attempted to fix all the phpunit deprecations. The following failures need to be investigated (I've tried but these are extremely complicated unit tests so I'm not sure if I've broken something or something has changed):
1.
OpenIDConnectTest::testCompleteAuthorization- only the 4th test case is failing. This is because preAuthorize is set to FALSE which means none of the config gets mocked.2.
OpenIDConnectTest::testConnectCurrentUser- All test cases are failing here because for some reason the email is getting set twice. I tried to debug this but have no idea why this is happening.Comment #12
acbramley commentedComment #13
mstrelan commentedI did some debugging for
OpenIDConnectTest::testCompleteAuthorizationin Drupal 10.3.x with a breakpoint in\Drupal\openid_connect\OpenIDConnect::completeAuthorization. In the 3.x branch the$contextvariable isFALSEso we never try to access the config, so never get the fail, but in the branch for this MR the context is an array with the account object set. I'll dig a little deeper as to why that might be different.Comment #14
mstrelan commentedFurther debugging found that in
\Drupal\openid_connect\OpenIDConnect::buildContextthe invocation ofopenid_connect_pre_authorizeyields different results between branches. In 3.x it returns an array but in this branch it returns NULL. So most likely one of the changes towithConsecutivehas broken this test.Comment #15
mstrelan commentedComment #16
benstallings commentedI can't vouch for all of the functionality, but I was able to enable the module in Drupal 11 without error.
Comment #19
jcnventuraComment #20
jmaguniaIt looks like an Entity Query is being made without an AccessCheck:
https://git.drupalcode.org/project/openid_connect/-/blob/3.x/src/Form/OpenIDConnectClientFormBase.php?ref_type=heads#L133
Comment #21
jmaguniaComment #23
mstrelan commented@pmagunia probably best to open a separate issue for that. Left feedback regardless.
Comment #24
jcnventuraLet's keep this here, it makes no sense now to move this back to "Fixed".
Comment #25
jmaguniaThanks @mstrelan.
I just corrected my previous commit.
Comment #26
jmaguniaComment #30
jcnventuraComment #32
moshe weitzman commentedAny chance we can roll a D11 compatible release?
Comment #33
mstrelan commentedThis has been included in the 3.0.0-alpha4 release.