Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Drupal 9 is built in Drupal 8 by deprecating APIs. Module Upgrader should not produce suggested transformations that are not Drupal 9 compatible.
Proposed resolution
Test with password_reset_tabs and see what the results look like.
Remaining tasks
Review. Fix. Commit.
User interface changes
None.
API changes
TBD.
Data model changes
TBD.
Release notes snippet
N/A
Comment | File | Size | Author |
---|---|---|---|
#17 | interdiff-3057394-17.txt | 761 bytes | joshi.rohit100 |
#17 | 3057394-17.patch | 12.32 KB | joshi.rohit100 |
| |||
#12 | interdiff-3057394-12.txt | 902 bytes | joshi.rohit100 |
#12 | 3057394-12.patch | 12.39 KB | joshi.rohit100 |
| |||
#9 | interdiff-3057394-9.txt | 6.03 KB | joshi.rohit100 |
Comments
Comment #2
joshi.rohit100I just identified the following transformation not D9 compatible -
Will raise a patch for them.
Comment #3
joshi.rohit100Patch uploaded.
Sample code that I tried -
"UserSave" transformation is working fine, so there is no change required for it.
Comment #4
amitgoyal CreditAttribution: amitgoyal commentedThanks @joshi.rohit100 for providing the patch.
Before applying the patch, I was getting below 5 errors,
After applying the patch, I am getting below 2 errors,
Looks like patch has fixed some of the issues but still some work needs to be done.
Comment #5
Gábor HojtsyI don't think all the Drupal 9 compatibility issues will be resolvable here with the module upgrader. I think opening multiple issues so they can be committed one by one would be better. There will definitely be db_* API issues for example. See #3033163: drupal_set_message is deprecated, replace it with MessengerInterface::addMessage() for an existing issue about a Drupal 9 compatibility issue.
Also, before more commits can be made to the module, its tests need to be made to pass unfortunately :/ See https://www.drupal.org/node/2196489/qa I opened #3072671: DMU 8.x-1.x branch test fails 20 times just now.
Comment #6
Gábor HojtsyNow that branch tests passed, sent this for a retest.
Comment #7
Gábor HojtsyOk some tests needs to be fixed for the new replacements, see the fails :)
Comment #8
joshi.rohit100Assigning myself to work on test failure fixes
Comment #9
joshi.rohit100Fixing test failures.
Comment #10
joshi.rohit100Comment #12
joshi.rohit100Fixing remaining failure.
Comment #13
amitgoyal CreditAttribution: amitgoyal commented#12 looks good to me. Thanks Rohit!
So far there is only one following deprecation for which we have separate issue - #3033163: drupal_set_message is deprecated, replace it with MessengerInterface::addMessage(),
Comment #14
Gábor HojtsyRetitled and edited the issue summary since this issue was taken over for some specific fixes instead of ensuring the whole of transformations are Drupal 9 compatible. Not sure @joshi.rohit100's sample was comprehensive of what DMU supports (he did not indicate it but also did not indicate it was not). That said, the verification from @amitgoyal was based on password_reset_tabs and not a general test scenario.
I recreated the general issue at #3080468: [META] Make sure transformations don't use deprecated APIs, so resulting suggestions are Drupal 9 compatible with the original issue summary and will make this a child.
Comment #15
Gábor HojtsyComment #16
Gábor HojtsyWhy are you not using Link::fromTextAndUrl() as indicated by the deprecation on Drupal:l() itself?
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Link.php/...
Comment #17
joshi.rohit100Changed link_generator service to `Link::fromTextAndUrl()`
Comment #18
Gábor HojtsySuperb, thanks! Otherwise looked good, so landed! :)