Problem/Motivation
Hello project maintainers,
This is an automated issue to help make this module compatible with Drupal 10.
To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects
Patches will periodically be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches 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 "ProjectUpdateBotD10" tag from the issue to stop the bot from posting updates.
The patches 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 patches 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 "ProjectUpdateBotD10" tag is left on this issue, new patches 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 patches 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 patches. The bot will still post new patches then if there is a change in the new generated patch compared to the patch that the bot posted last. Those changes are then up to humans to integrate.
- Leave open but stop new automated patches.
If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated patches, remove the "ProjectUpdateBotD10" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated patches again, add back the "ProjectUpdateBotD10" 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 patches will be posted here.
If the issue is reopened, then new automated patches will be posted.
If you are using another issue(s) to work on Drupal 10 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.
Providing feedback
If there are problems with one of the patches 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 |
|---|---|---|---|
| #24 | 3289683-24.patch | 10.83 KB | alexpott |
| #24 | 23-24-interdiff.txt | 2.44 KB | alexpott |
| #23 | 3289683-23.patch | 12 KB | alexpott |
| #13 | simplesamlphp_auth-d10-3289683-13-interdiff.txt | 1.06 KB | berdir |
| #13 | simplesamlphp_auth-d10-3289683-13.patch | 11.18 KB | berdir |
Issue fork simplesamlphp_auth-3289683
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 by Drupal Rector. Please see the issue summary for more details.
It is important that any automated tests available are run with this patch and that you manually test this patch.
Drupal 10 Compatibility
According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.
Currently Drupal Rector, version 0.12.0, cannot fix all Drupal 10 compatibility problems.
This patch does not update the
info.ymlfile for Drupal 10 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.
Debug info
This patch was created using these packages:
Comment #3
berdirWorked a bit on this, but this is all blocked on being able to install simplesamlphp on Drupal 10/Symfony6.
See https://github.com/simplesamlphp/simplesamlphp/issues/1588 and https://github.com/simplesamlphp/simplesamlphp/pull/1675.
Comment #4
berdirComment #6
berdirRemove core, also update the test module.
Comment #7
berdirLets see what happens if we do this. I had two merge requests merged into simplesamlphp/simplesamlphp, requiring dev-master into a Drupal 10 project works now, but there's still a minor thing with symfony/translation-contracts versions, not sure if DrupalCI can handle that.
Comment #10
japerryI think this is good to go. I saw that the simplesamlphp_auth code Berdir got merged upstream was reverted from the 2.0 branch.. hence the dev-master reference. We can always update this later once it works with 2.0.
Comment #11
berdirAs discussed, I disagree.
Depending on a development branch is not compatible with a stable branch, they could introduce breaking changes at any point.
And 2.x will likely never be PHP 8 compatible, but a 3.x release might not be too far off: https://github.com/simplesamlphp/simplesamlphp/pull/1675#issuecomment-12....
So, I will likely create a new 4.x branch, commit this there, maybe support only dev-master, maybe 1.x and dev-master, and then switch to 3.x once that's available and make it stable.
Comment #12
berdirHere is an updated patch that will be committed to a new 4.x branch, upped the core version to 9.4 and simplified the moduleHandler changes. Ignored the coding standard changes in the MR as these should not only be in 4.x and also dropped some of my minor phpunit class cleanups, same for that.
Comment #13
berdirOh, new test fails, classy is gone. Considering to backport a handful of the changes to 8.x-3.x as well, like this to keep future updates easier to be in sync.
Comment #14
berdirhttps://www.drupal.org/project/simplesamlphp_auth/releases/4.x-dev
Keeping this open for now while I consider to backport some of the changes to keep the branches in sync.
Comment #15
berdirComment #16
project update bot commentedUpdating bot issue summary.See #3313904: Update project bot templates for RTBC status support and human interaction tips
Comment #17
safetypinI attempted to use this release of the module to allow us to update our php version to 8.x, but I got an error message about simpleSAMLphp v1.19.1 being incompatible with php versions equal or greater than 8.0. I read in the simpleSAMLphp git issues something that made me think there was a version of simpleSAMLphp that was compatible with php 8.x. I only noticed this morning that the version of Drupal we're using refuses to do database updates because our version of php is out of date (7.4.x). This is a pretty big issue, because we require simpleSAMLphp for authentication, but we need this module to be updated. Is there a different version of this we should use to be compatible with php 8?
Comment #18
berdirSee #3285729: PHP 8 Incompatibility, simplesamlphp is PHP 8+ compatible, you just need to make sure you are using the most recent patch version, require that explicitly.
Comment #19
safetypinActually, it looks like I was able to update the SimpleSAMLphp library to 1.19.6, and it looks like that version is compatible with php 8.0.24. I'm not 100% sure it's truly compatible; there are some issues in the SSP github issue queue that indicate that there are blocking bugs that still haven't been resolved.
Comment #20
safetypinThanks @Berdir!
Comment #21
alexpottThe previous code would exit on the first FALSE whereas the new code will fire all hooks potentially wasting cycles. Not sure it matters but pointing this out.
This change doesn't look right for two reasons:
1. We're no longer wrapping
if ($this->config->get('autoenablesaml')) {2. We're no longer setting $account in the main method here - so logic that follows on from this is likely to be broken.
Comment #22
alexpottAddressed #21 in #3334908: Make 4.x behave the same way as 8.x-3.x
Comment #23
alexpottHere's a patch for 8.x-3.x that changes the minimum version to 9.4 but doesn't yet allow Drupal 10 and fixes all the deprecations. If there was an 8.x-3.x release with this change it'd be easier to prepare projects for Drupal 10. We could even consider allowing D10 on this branch and making 4.x just about supporting the new version of the library when it comes out.
9.4 is the lowest security supported version of Drupal 9 and Drupal 8 is out of support so I think this change is okay.
Note this patch includes the improvements from #3334908: Make 4.x behave the same way as 8.x-3.x
Comment #24
alexpottMissed something... oops... Forgot to add back in the check for
if ($this->config->get('autoenablesaml')) {that was remvoed by #13Comment #26
berdirThanks, did run the tests manually for now. And 4.x and 8.x-3.x are identical now except the core requirement and dependencies.
Comment #27
edmund.dunn commentedI am running into this error using the 4.x branch.
Unable to install module simplesamlphp/simplesamlphp-assets-base, package name must be on the form "VENDOR/simplesamlphp-module-MODULENAME".For context, we are setting up a test instance of Drupal 10 as a starting point for our upgrade from Drupal 9. Currently, this is the only remaining blocker to getting composer to update.I am happy to work on this, but I am unsure how to start. I did look through the https://github.com/simplesamlphp/simplesamlphp repo. I noticed that the simplasamlphp-assets-base package doesn't seem to make it into their releases.
Comment #28
berdiri don't know what depends on it and why you get that error, but we have passing tests on D10. That doesn't mean much, but it it at least shows that this 4.x *can* be installed on D10. i suggest you create a new issue and check where/why you depend on that. Maybe that no longer exists on dev-master?
Comment #30
drase15 commentedHello,
I know this thread is closed, but someone can help me please.
I tried to download the module from branch 4 with composer, but I get this error:
But D10 require php 8 or higher.
How can I install this module from branch 4, compatible with D10, but get error on php version?
Thanks in advance
Comment #31
gwvoigtSame error as #27
Comment #32
mark_fullmerThis occurs if you have previously installed the simplesamlphp assets into the
vendordirectory before updating. You can resolve this by removing thevendordirectory, then doing the composer update. FWIW, this is not really an issue with the simplesamlphp_auth Drupal module.Try explicitly requiring
simplesamlphp/simplesamlphp ^2first.