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 |
|---|---|---|---|
| #16 | d10-compatibility-3297964-12.patch | 5.51 KB | tushar1 |
| #9 | responsive_menu_drupal-check_status.txt | 6.04 KB | tushar1 |
| #9 | Testing in D10 setup_responsive_menu.mp4 | 743.02 KB | tushar1 |
| #8 | d10-compatibility-3297964-8.patch | 3.16 KB | hemangi.gokhale |
| #6 | responsive_menu-3297964-6-once.patch | 1004 bytes | czigor |
Issue fork responsive_menu-3297964
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.13.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
project update bot commentedUpdating bot issue summary.See #3313904: Update project bot templates for RTBC status support and human interaction tips
Comment #4
czigor commentedThe info file changes.
Comment #5
czigor commentedGetting rid of jquery.once. See https://www.drupal.org/node/3158256.
Comment #6
czigor commentedComment #7
_randy commentedTested #2, #4 and #6 on D10.0.3 and so far it runs well. No new issues to report.
Comment #8
hemangi.gokhaleD10 compatibility was missing on this file /tests/themes/responsive_menu_theme_test_nobp/responsive_menu_theme_test_nobp.info.yml. I have added it and have consolidated all the patches into one patch.
Comment #9
tushar1 commentedI tested patch #8 on latest 10.0.7 drupal version which is applied cleanly and working as expected..module showing compatible in upgrade_status and also there are false positive issues in drupal-check which are ignorable...so making it RTBC for latest D10 release..
Comment #10
dwwThanks for working on this! However, this can't possibly be RTBC if the testbot is failing. We need to see passing green tests before this could be committed.
Cheers,
-Derek
Comment #11
tushar1 commentedUpadated patch #8 for passing the test kindly review..
Comment #12
tushar1 commentedComment #13
tushar1 commentedComment #14
tushar1 commentedComment #15
tushar1 commentedComment #16
tushar1 commentedComment #17
tancThanks for these patches and your time! It looks like the tests are failing on the polyfills inclusion. I wonder whether with release 5.x we can drop IE support? Considering Drupal 10 doesn't support IE I think it's safe to remove it. It will mean removing the test, the form item and the config.
Comment #18
jprj commentedThanks for the patch. Have tried it on a site migrated to D10 and it behaves as I expected.
Comment #19
dbielke1986 commentedThe patch is also working for me - so we can mark this as RTBC.
Is there a chance to push the changes to a new release? We need to update our page to D10 and this module is one which is incompatible to D10.
Comment #20
soumyajit40cs commented{
"name": "drupal/responsive_menu",
"version": "4.4.2",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/responsive_menu.git",
"reference": "4.4.2"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/responsive_menu-4.4.2.zip",
"reference": "4.4.2",
"shasum": "26d13cc0fa3bbaf4a4a83f0012095e01cbcc5272"
},
"require": {
"drupal/core": "^8 || ^9"
},
I have applied the patch to D10 compatibility issue. When I checked the composer.lock file noticed that still it required Drupal core 8/9. That's why when I am trying to update drupal core it's failed.
Comment #21
dbielke1986 commentedComment #22
dreamleafI can also confirm the combined patch in #16 is working, this is a really great module and one of my only blockers to updating some sites to D10.
Any chance of getting a working release out with the patch rolled in please? If there are sub issues (such as the IE polyfill stuff) can these get put as active issues so people can help out and get this module fully kick ass.
Comment #23
heikkiy commentedCould we also create a fork of the current 4.4.x and 5.x branches with the changes? It's not possible to install the module with Composer with a patch but it is required to use a fork. So it would be more easy to test the module with Drupal 10 if we had a fork with the changes.
Comment #24
mortona2k commentedI also vote for updating the dev branches, but here's how I've worked around that.
Clone the project repo into modules/pinned. Download and apply patches in that directory, or check out the issue fork you want to use. Maybe add a readme that describes the patches or the commit you used.
If the module has composer dependencies, set it up as a custom module in composer so they are picked up with composer install.
Git is weird about checking in other git repos, and I don't totally understand it. Dev modules installed with composer will include the git repo but git warns you when you add it. I have been deleting dev repos with [find -name .git -exec rm -rf {} \;], but DO NOT RUN THAT IN YOUR ROOT DIR!!! If anyone has insight on a better workflow, I'd love to hear it.
Composer updates will clone the dev repos again, so I have to repeat this often. However, it won't touch ones in modules/pinned, since they aren't installed via composer.
If I have to work on the pinned module again, I add the project repo or issue branch as a remote. [git init; git add .; git commit -m "Initial commit"; git remote add origin PROJECT_REPO; git checkout BRANCH --force; git clean -fd . (to clean up stray files like INSTALL.md)].
Now you have the latest changes from the branch you want, with your previous version saved in a commit. Depending on what you want to do, you could reapply the patches, or add more issue branch remotes and merge those branches in.
If you follow these steps, don't add the module with composer or else you'll get a duplicate and confuse Drupal. To go back, delete the pinned module and install the project with composer again. If Drupal is still looking in the old dir, you have to hack the database, I think to truncate one of the cache tables. If you can disable the module first, that saves some trouble, but is not always possible.
Comment #26
heikkiy commented@mortona24k The above flow doesn't at least for us work because we use automated deployments and we need to be able to install the module with Composer completely.
I now created a new issue fork from this issue and applied the patch #12 to it.
I was able to install the patch and it seems like our menu is working again. I need to do more testing that our all styles still work but at least I was able to now get rid of the deprecated jquery.once errors.
To install the merge request in your project with composer you can follow this guide.
In your composer repositories add this:
Then under normal Composer repository for Drupal add the module as excluded:
And finally you can install the forked version with Composer:
This should install the merge branch with all the Drupal 10 fixes applied.
Comment #27
stephen-cox commentedWe have the changes on the issues fork https://git.drupalcode.org/issue/responsive_menu-3297964/-/tree/3297964-... are working on a number of sites without issue.
Would be great if we can get a dev release with this at a minimum so we don't have to keep using the issue fork to install it.
Comment #28
devil2005 commentedHi,
+1 with #27
Thanks a lot
Comment #30
stephen-cox commentedI've merged this into the 5.0.x branch and created a 5.0.0-alpha1 release with Drupal 10 support.