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.
Issue fork system_stream_wrapper-3289927
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 this patch makes this module compatible with Drupal 10! 🎉
This patch updates 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
project update bot commentedUpdating bot issue summary.See #3313904: Update project bot templates for RTBC status support and human interaction tips
Comment #4
kunalgautam commentedRe-roll patch for Drupal version 10.1.x
Comment #5
ajeet_kumarI reviewed and verify patch with 8.x.1.x version with Drupal 10 there is non ignorable issues found. Drupal 10 compatibility issues fixed.
Comment #6
ajeet_kumarI reviewed and verify patch with 8.x.1.x version with Drupal 10 there is non ignorable issues found. Drupal 10 compatibility issues fixed.
Comment #7
abhinavk commentedI tested patch #6 in drupal 10.0.8 and it looks good to me. Module is made d10 compatible with this patch.
Moving this to RTBC.
Comment #8
steffenrThanks for your work on making the module D10 ready.
Can you provide a new 1.x-dev release please, since the issue is marked as being RTBC?
Thanks in advance,
SteffenR
Comment #11
loopy1492 commentedI've created a Merge Request for the maintainers to merge and for us to use in our composer.json file.
Comment #12
alvarodemendoza commentedComment #13
trevorbradley commentedI have no idea why, but patch #12 does not deploy against the dev branch. Here's my revised version:
EDIT: BAD FILE DO NOT USE DO NOT USE (Why can't I delete this?)
Comment #14
trevorbradley commentedComment #15
trevorbradley commentedDarn it, uploaded the wrong file...
EDIT: BAD FILE DO NOT USE DO NOT USE (Why can't I delete this?)
Comment #16
trevorbradley commentedComment #17
trevorbradley commentedSorry folks, my brain is broken on Friday. Let's try this one last time.
EDIT: Nope, that's no good either - I'm not including the new composer.json file. Let me get this right.
Comment #18
trevorbradley commentedComment #19
trevorbradley commentedSorry for all the spam folks.
I'm a bit stumped as to why #12 isn't applying but #18 is. Someone better check this one last time.
I moved this out of "Reviewed and Tested" back to "Needs Review". Something's not quite right with #12.
Comment #20
guedressel commented@TrevorBradley I'm not sure what you tried to accomplish with your patches, but since a main aspect is to introduce the composer.json file into the module, you may use the merge request !2 in your projects composer.json until the maintainers create a new release including the D10 adoptions from that merge request.
You may want to read https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr...
Merge request !2 works fine.
Switching to RTBTC
Comment #21
alvarodemendoza commented@guedressel Is not recommended to use the MR as a patch because this can be changed by anyone and it's a security risk. If you find an issue you with no patch you should create the patch, basically copying the patch in the MR to a patch file and upload it. This will help to keep the repos safe until the patch is committed.
Comment #22
stborchert@AlvaroDeMendoza Simply using a patch file won't work if you try to upgrade your site using composer. Composer reads the module dependencies from the composer.json shipped with the module and would still get the old information from the repository.
Example: running
composer why-not drupal/core10.1with the latest development version of system_stream_wrapper installed will result indrupal/system_stream_wrapper 1.x-dev requires drupal/core (^8 || ^9)even if you apply the patch using composer.Using the branch (issue fork) of the merge request bypasses the problem, since composer directly uses this branch and gets the correct module dependencies.
If you worry about someone randomly changing the code within the merge request you are able to lock the module in your composer.json on a specific commit (see https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr... linked by @guedressel).
RTBC+1 btw
Comment #23
alvarodemendoza commentedThank you @stBorchert. That's better than using drupal linient.
Comment #25
fernly commented@ TrevorBradley the patch struggle is real ;-)
For anyone wondering, patch #12 works against version 1.0.0-alpha3 (that is not latest dev, but the alpha3 version). I, for one, prefer alpha over dev.
RTBC +1
Comment #26
deviantintegral commentedHey folks, thanks for the efforts on this! I gave it a review. I'd like to sync with Dave Reid too, but he's unavailable right now. Regardless, let's aim to get this committed by the end of the week.
I left a few review notes on the MR. Nothing major, this is pretty close to done.
A total aside:
Actually, _technically_ patch files are vulnerable to code swaps too. A regular user can't do it, but there's no authenticity or integrity checks beyond what HTTPS provides in transport. At Lullabot, we've standardized on always committing a copy of a patch to the repository and never referencing them with `https://...`: https://architecture.lullabot.com/adr/20220429-composer-patch-files/
Comment #27
deviantintegral commentedI've updated from my review notes earlier. I also fixed up tests and got them running on GitLab: https://git.drupalcode.org/project/system_stream_wrapper/-/pipelines/51933. I've left the old test bot in place for now.
My plan is to merge this Monday, and switch over to a semantic module version release at the same time, tag a 1.0, and opt in to security coverage.
Comment #28
deviantintegral commentedComment #30
deviantintegral commentedThanks everyone for the initial work on this. The MR is committed, tests are passing, and I tagged a 2.0.0 release to get us into semver.
https://www.drupal.org/project/system_stream_wrapper/releases/2.0.0