Problem/Motivation

We are using the conditional_fields module on several of our websites that we want to migrate to Drupal 11.

Proposed resolution

  • Implement a Drupal 11 compatible version of this module.
  • Fix phpcs, phpstan, eslint, stylelint and cspell warnings.
  • Fix unit tests.

Updated unit tests don't run on Drupal 9 anymore because of the following deprecation:

EntityReferenceTestTrait is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait instead.

Remaining tasks

Publish, review and validate MR.

Testing on Drupal 11

To test on Drupal 11, add the following lines to your composer.json repositories section:

  "repositories": [
    {
      "type": "vcs",
      "url": "https://git.drupalcode.org/issue/conditional_fields-3478862.git"
    },

and then run:

composer require drupal/conditional_fields:dev-3478862-drupal-11-compatibility
Command icon 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

mably created an issue. See original summary.

mably’s picture

Issue summary: View changes
mably’s picture

Issue summary: View changes
mably’s picture

Issue summary: View changes
mably’s picture

Status: Active » Needs review
StatusFileSize
new153.07 KB

All tests are green 🎉

Pipeline results are all green

mably’s picture

Issue summary: View changes
mably’s picture

Issue summary: View changes
mably’s picture

Issue summary: View changes
jaswinsingh’s picture

Hello,

I have created a patch for 4.0.0-alpha5.

joseph.olstad’s picture

nagy.balint’s picture

Any news on this issue?

What do we need to commit this?

rahul17’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new132.49 KB
new256.73 KB
new161.75 KB
new153.55 KB

Tested MR !58 changes in Drupal 10.3 and Drupal 11, functionality is working fine and also upgrade status is showing no problem found.

Changing status to RTBC.

dqd’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Why do we have a duplicate issue created a month ago while there was already one existing with contribution of original maintainers of this project? (not talking about me here)

Thanks for all the efforts and any contribution is very much appreciated to move on. But please let us keep things sorted and do not let us outframe efforts in other issues already made and please MR this here if required into the former compatibility issue exisiting already since March of this year.

Million thanks! And sorry for any inconveniened feelings about it. But it would not be very nice regarding the previous issue work done. This is why we usually follow the rule to mark the newer as duplicate of the former. This way we do not loose track of overlapping fixes and do not loose track of credits on efforts in the issues.

mably’s picture

Ok for me, as long as we get a Drupal 11 release quick.

That was a lot of hard work though.

mably’s picture

dqd’s picture

That was a lot of hard work though.

Indeed! Very impressive and very much appreciated. It was hard for me to make this very unsatisfying step. But it is a common procedure on Drupal to prevent credit and fix overlapping issues. And I am sorry for the frustration. I recommend to use the issue search before starting an new issue. Or if you feel the original issue is not going in the right direction or too slow, to ping contributors or to discuss in the issue how to move on. I think your contributions are awesome and can move things forward a lot. +1 And your thoughts will weight. So I don't want to demoitilize you in any way and hope you keep up your awesome work! Thanks for pushing into the previous issue!

mably’s picture

You're welcome :)

I guess that's the "Automated" part of the other issue that got me wrong.

mably’s picture

Assigned: mably » Unassigned