Problem/Motivation

We are using the entityreference_filter 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.
  • Add Gitlab CI.
  • Add README.

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/entityreference_filter-3478914.git"
    },

and then run:

composer require drupal/entityreference_filter:dev-3478914-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
Status: Active » Needs review
mably’s picture

StatusFileSize
new175.9 KB

All green 🎉

Pipeline results are all green

mably’s picture

Issue summary: View changes
ryan-l-robinson’s picture

Thank you. I'm not quite ready to go for Drupal 11, but I used this to fix some errors stopping me from running other unit tests.

maximkashuba made their first commit to this issue’s fork.

  • maximkashuba committed 0a240377 on 2.0.x authored by mably
    Issue #3478914: Drupal 11 compatibility fixes for entityreference_filter
    
maximkashuba’s picture

Status: Needs review » Fixed
Issue tags: +Drupal 11 compatibility

Thank you mably for the patch! Great job!

maximkashuba’s picture

hi @mably,
yep better to use static. Could you reopen the issue and add the patch ?

mably’s picture

Another solution is then to make the constructor final to avoid the phpstan warning. Are you ok with that?

Or should just add a phpstan ignore?

maximkashuba’s picture

malby,
i don't want to make constructor final,
plz just use static instead of self.

mably’s picture

@maximkashuba MR 25 is ready for merging.

EDIT: could the 2.0.x branch be made the new default? We are still stuck on 7.x-1.x.

maximkashuba’s picture

Status: Fixed » Needs work

  • maximkashuba committed 4af8d904 on 2.0.x authored by mably
    Issue #3478914 by mably, maximkashuba: Drupal 11 compatibility fixes for...
maximkashuba’s picture

Status: Needs work » Fixed

Yes, it's ok. Thank you @mably.

mably’s picture

You're welcome :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.