Automated Drupal 11 compatibility fixes for conditional_fields

Created on 15 March 2024, 9 months ago

Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 11.

Changes will periodically be added to this issue that remove deprecated API uses. To stop further changes 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 "ProjectUpdateBotD11" tag from the issue to stop the bot from posting updates.

The changes 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:

  1. Accept automated changes 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 "ProjectUpdateBotD11" tag is left on this issue, new changes 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 changes 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 changes. The bot will still post new changes then if there is a change in the new generated patch compared to the changes that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated changes.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated changes, remove the "ProjectUpdateBotD11" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated changes again, add back the "ProjectUpdateBotD11" tag.

  3. 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 changes will be posted here.

    If the issue is reopened, then new automated changes will be posted.

    If you are using another issue(s) to work on Drupal 11 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

  1. Apply the latest patch in the comments by Project Update Bot β†’ or human contributors that made it better.
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.

Using the merge request

  1. Review the merge request and test it.
  2. Thoroughly test the changes. These changes are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the merge request, create a new branch and merge request and work from there.

Warning: The 'project-update-bot-only' branch will always be overwritten. Do not work in that branch!

Providing feedback

If there are problems with one of the changes 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 β†’ .

πŸ“Œ Task
Status

Needs review

Version

4.0

Component

Code

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @project update bot
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 9 months ago
    130 pass
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module β†’ , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.

    Therefore these changes did not update the info.yml file for Drupal 11 compatibility.

    Leaving this issue open, even after committing the current patch, will allow the Project Update Bot β†’ to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug info

    Bot run #11-120024

    This patch was created using these packages:

    1. drupal/upgrade_status: 4.1.0
    2. mglaman/phpstan-drupal: 1.2.7
    3. palantirnet/drupal-rector: 0.20.1
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 9 months ago
    130 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 8 months ago
    130 pass
  • This comment was forced and has ignored the check if a change was already posted. This is only done when we want to update the issue without waiting for changes to happen.

    This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module β†’ , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.

    Therefore, these changes did not update the info.yml file for Drupal 11 compatibility.

    The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot β†’ to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-137198

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.1.0
    2. mglaman/phpstan-drupal: 1.2.10
    3. palantirnet/drupal-rector: 0.20.1
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 8 months ago
    130 pass
  • First commit to issue fork.
  • Status changed to Needs work 4 months ago
  • heddn Nicaragua

    Tests are failing on errors around EntityReferenceTestTrait. We also might want to just set the minimum Drupal core version to 10.1 and remove some of the BC logic in the latest MR. That said, I'll let another maintainer comment about jumping the minimum supported version.

  • First commit to issue fork.
  • Merge request !54Prepare for Drupal 11 compatibility β†’ (Closed) created by BenStallings
  • Pipeline finished with Canceled
    4 months ago
    Total: 173s
    #254325
  • Status changed to Needs review 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States BenStallings

    It looks like the tests are passing now! With the addition of a composer.json file, the module now installs with composer and can be enabled in Drupal 11. Just need someone else to confirm, please.

  • Pipeline finished with Success
    4 months ago
    Total: 1232s
    #254327
  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    That said, I'll let another maintainer comment about jumping the minimum supported version.

    @heddn My vote for (agree) on 10.1 minimum since Drupal 9 EOL was in 2023

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    @BenStallings: thanks for working on it.

    Just need someone else to confirm, please.

    These are just warnings but maybe we should care them since they are Drupal 11 related and this way we would have a clean compatibility fix.

    Blocker - Ignored error pattern #^Call to deprecated function watchdog_exception\(\)\: in drupal\:10\.1\.0 and is removed from drupal\:11\.0\.0\. Use Use \\Drupal\\Core\\Utility\\Error\:\:logException\(\) instead\.$# in path /builds/issue/conditional_fields-3428532/src/Form/ConditionalFieldEditForm.php was not matched in reported errors.
    in src/Form/ConditionalFieldEditForm.php:0
    
    Major - \Drupal calls should be avoided in classes, use dependency injection instead
    in src/Form/ConditionalFieldEditForm.php:578
  • πŸ‡¨πŸ‡·Costa Rica maunm

    Adding a patch with the current D11 compatibility changes.

  • Status changed to RTBC 3 months ago
  • heddn Nicaragua

    We've got the BC layer working for 10.1, so let's just go with it.

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    We've got the BC layer working for 10.1, so let's just go with it.

    @heddn: Yeah, agreed, see my edited previous comment πŸ“Œ Automated Drupal 11 compatibility fixes for conditional_fields Needs review . I just forgot to press enter yesterday on night shift. *facepalm*

  • Status changed to Needs work 3 months ago
  • heddn Nicaragua

    Nope, needs work. Tests are failing. And since many of the test fixes are related to the 10.1 deprecations, feel free to reduce compatibility to 10.1+.

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    "Nope" to what? ... Sorry it's not my week. RTBC came from you. Maybe language barrier ... ?

  • heddn Nicaragua

    Sorry, that was a bit terse. My "No" was in reference to my setting this as RTBC. It isn't ready for that as the tests fail on D11 and that needs to be resolved before this can go back to that state.

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Thanks for coming back on this and helping me understanding. No need to sorry :) It would be surely obvious to me usually if I wouldn't be so tired at the moment. In that condition non native languages become more and more cloudy over the night, hah.

  • First commit to issue fork.
  • Merge request !59Drupal 11 readiness β†’ (Closed) created by nicxvan
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    nicxvan β†’ changed the visibility of the branch 3428532-automated-drupal-11 to hidden.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    nicxvan β†’ changed the visibility of the branch add-composer-json to hidden.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    composer.json got added upstream I found it easier to create a new branch.

  • Pipeline finished with Failed
    27 days ago
    Total: 282s
    #331371
  • heddn Nicaragua

    Looks like we're missing a dependency on jquery somewhere.

  • πŸ‡­πŸ‡ΊHungary nagy.balint

    This seems to be a duplicate of ✨ Drupal 11 compatibility fixes for conditional_fields Active

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    The opposite is the case. We usually mark the newer as duplicate in favour of the former, and if the newer has more progress on the exact same issue it should be merged into the former to not loose track of overlaps and do not loose credits on both efforts.

  • First commit to issue fork.
  • Pipeline finished with Success
    15 days ago
    Total: 1505s
    #342373
  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Awesome! Thanks @mably for pushing your efforts in the other into the original issue. +1 Reviews to move on quick what be great.

  • heddn Nicaragua

    Adding the IS update tag. There are 3 open MRs and several patches. Can we get some notes added here on which should be reviewed (and please document why a previous MR/patch can't be used any longer).

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    @heddn Agreed in terms of clutter. That was not intended this way. But please lets cherish and value the contributions at first. Read the last issue comments here and on the duplicate issue for a birds eye view. It just takes some minutes. It took me 1 hour to sort the motivations of each issue and I try to prevent additional resources wasted and explained clearly that I tried to merge forces here. And it seemed that nobody cared about that 2 issues where co-existing and running MRs parallel without anyone chiming in to clarify. It should be handled respectful on each of the issues, that contributors put efforts in them. And it would not be OK to close this one here in favour of the newer one, which was already RTBC. In both issues work has been done which could possibly be interacted in each other. Which needs inlaying changes line by line, actually. And that's what I asked for. I only can ask the contributors to cooperate. I cannot force them to do it the way which is most useful to you or me or others passing by. Possible reason for different MRs could be that others can not add into the previous MRs? Not checked yet. I need to take time to look deeper into each of them (like anyone could do) but I am on the road since some days because my brother died tragically some days ago and my heart is broken and we are about to bring the family together and bury him in the next week. So, my apologies for only conducting without going into the lines at this moment.

    It would be interesting to know if last MR in here passes tests.

    #24: I asked for support and contribution on this issue and I am thankful for each effort but I am not sure if another branch was helpful at this moment.

    #28: I actually asked for merging your efforts into this issue here and not just creating another MR without comments. But I am thankful for all contributions.

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    I created a new one because I don't like pushing to the project bot only branch and we had to rebase cause the paragraphs issue also created the composer.json.

    I'm happy to close mine.

    Looking briefly at the new one, it has a lot of changes unrelated to drupal 11 support: 43 files + 624 βˆ’ 661.

    Whether that is acceptable is left up to the maintainers, but that is a lot more to review than the changes in my MR, though my MR still needs the jquery dependency issue resolved.

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    That is very helpful review @nicxvan. Thank you!

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan
    • Bot one is 43.
    • Mine is 59.
    • Newest is 62.
  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Sorry I edited my comment. I added:

    EDIT: In fact it is not recommended to push into the bot MR and from a glimpse I think the last MR worked on before your additions was not the bot one. Not sure yet. But as you have explained that has been done for different reasons. Anyways your try to help is very much appreciated. As always .

    Mine previously of yours was 54 I think.

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Never mind, let's merge forces and let's try to pick best of all to narrow down this issue to a reviewable state. I will try my best this night to take a look into each of the MRs deeply...

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Looking briefly at the new one, it has a lot of changes unrelated to drupal 11 support: 43 files + 624 βˆ’ 661.

    Hm, that's not good. @mably would you mind to address these reported flaws in your MR?

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Just to clarify, whether those code style changes are acceptable here is up to the maintainer. It's not an inherent issue.

    If you're ok with addressing code style issues here too then we can review it as is.

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    I am fully with you and heddn on this. And please let us do not waste your or other users resources. I asked the contributor from the duplicate issue to add his "ideas" into the original issue and he was kind enough to do so. But of course I did not meant by asking to only copy paste it without looking at the issue scope, the issue parts already fixed and without checking which of his additions are obsolete of useful and still missing and which not. We should start from the MR with the most progress and less things to do.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    nicxvan β†’ changed the visibility of the branch project-update-bot-only to hidden.

  • Pipeline finished with Canceled
    14 days ago
    Total: 164s
    #343122
  • Pipeline finished with Success
    14 days ago
    Total: 2072s
    #343124
  • heddn Nicaragua

    This would be a bit easier to review if this wasn't such a mix of code quality and Drupal 11 fixes. For future note, let's keep those distinct. I've posted some feedback on the MR. Hopefully not too onerous.

  • Pipeline finished with Canceled
    6 days ago
    Total: 702s
    #352510
  • Pipeline finished with Success
    6 days ago
    Total: 1470s
    #352519
  • Pipeline finished with Skipped
    5 days ago
    #353688
  • Pipeline finished with Skipped
    5 days ago
    #353692
  • heddn Nicaragua

    Let's call this good enough. I'll leave it a few days, maybe a week before I cut a new release in case something crops up between now and then. But the dev branch is now D11 compatible. Thanks everyone for you work here.

  • Pipeline finished with Skipped
    5 days ago
    #353693
Production build 0.71.5 2024