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
Periodically patches will be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted simply close this issue (any status besides Active, Needs review or Needs work) or remove the "ProjectUpdateBotD10" tag from the issue.
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 or Needs work) 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.
- Leave open but stop new automated patches.
If you want to use this issue as a starting point to remove deprecated API uses but don't want new automated patches simply leave this issue open but remove the "ProjectUpdateBotD10" tag from the issue.
You can use Drupal Rector yourself to make these patches.
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 or Needs work) 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 may be useful to other contributors to add those issues as "Related issues" when closing this issue.
Remaining tasks
Using the patches
- Apply the patch in the comment by Project Update Bot.
- Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
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 Infrastructure project issue queue using the component “Bot: Drupal Rector”.
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | interdiff_20-25.txt | 1.39 KB | heddn |
| #25 | 3296959-25.patch | 2.97 KB | heddn |
Issue fork diff-3296959
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 #4
kristen polThe dev branch is already compatible with Drupal 10 but moving this to Active for now in case there are more bot patches. This module also still needs a release for the Drupal 10 version.
Comment #7
balintpekkerFixed a couple of issues reported by
drupal-checkas well as the tests. Intentionally missed outProphecyTraitas it breaks PHP7.3/PHPUnit8 compatibility. If the maintainers decide that is OK and they want to drop support for these, of course it can be included.Comment #8
nkoporecFound some minor things, so setting as needs work. I think we should only focus on D10 compatibility changes and not phpstan issus, they can be tracked in a separate issue, so its easier to review.
Comment #9
balintpekkerComment #10
nkoporecLooks good to me, setting as RTBC.
Comment #11
smustgrave commentedWondering if we could get a release with this fix? We use diff in another contrib module and are blocked from updating. Thanks!
Comment #12
psingh10 commentedComment #14
balintpekkerSetting back to RTBC as the patch provided in #12 is already part of the MR with backwards compatibility, and tested.
Comment #15
mglamanI left some feedback. Most of this isn't needed, but I am concerned on
$format->namechange. Given what was said in this issue, it should be crashing. And the code in this MR shouldn't work either (it's not a field value.)Comment #17
heddnThis passes green on local. Let's see how the testbot likes things.
Comment #18
heddnThis passes green on the testbot for 10.x and 9.4. LGTM.
Comment #19
berdirAs discussed, after the cleanup what's left here is fixing a single test that we previously didn't notice because when the already existing D10-compatible version was created as part of #3264928: Add support for Drupal 10, classy was still in core.
I left a comment about the changes there, feel free to either commit or make some changes first, it's pretty minor.
Comment #20
heddnI did research and found that #2718381: Incorrect Breadcrumb for Markdown diff added the extra breadcrumb asserts. But they aren't really needed so I've removed it to make the tests less brittle. The other item that slipped in since this was re-rolled is a change that seems to impact the trimming logic in
DiffPluginTest. I got tests passing by altering the test. It seems to be still testing what it was before, but I'm not really sure why the line numbers are all off. A bit disconcerting so leaving this up for review for other's feedback.Comment #21
berdirFine by me, but the tests didn't run as it's the wrong php version.
Default configurations should be updated, I do prefer to do patch testing on the lowest supported version and have a weekly d10 test. It's IMHO more likely to break d9 than d10 at this point
Comment #22
heddnWe have a situation where on D10, there are only 4 rows and in D9, there are 5 rows. What changed here?
Comment #23
berdirNo idea, assuming it can be reproduced locally, you need to run the test and dump the exact output you get and compare it, seems to be testing a very specific thing with empty lines, possibly the test tools we use changed?
Comment #24
heddnI hunted and found that https://www.drupal.org/node/3299678 is what is breaking things. The new diff engine used by core 10.1+ shows slightly different amounts of context data then prior to that commit. Let's fix that.
Comment #25
heddnComment #27
berdir+1 if that comes back green.
Comment #28
heddnThanks everyone for your help and patience here. This is now landed and default CI test runner configuration adjusted to default to 9.5 on issue/commit and 10.1.x for weekly.
Comment #30
joseph.olstadThis fix should go into a tagged release. I just hit this on the latest tagged release 1.1.0 from 2 years back