Problem/Motivation

Recent updates added in 2.0.4 is not compatible with Drupal 10.2 which is still supported until December 9th.

Systems on 10.2 experience this error:
NOTICE: PHP message: Uncaught PHP Exception Error: "Class "Drupal\Core\Render\Element\FormElementBase" not found" at /opt/drupal/web/modules/contrib/autocomplete_deluxe/src/Element/AutocompleteDeluxeElement.php line 15

RenderElement and FormElement base plugin classes were renamed to RenderElementBase and FormElementBase in Drupal 10.3. Versions before this change will break and will be prevented from receiving future security updates.
https://www.drupal.org/node/3436275

#3473149: Support Drupal 11 compatibility and drop support for Drupal 8/9
#3273248: Fix not working single value field for Autocomplete Deluxe element UI

Proposed resolution

Create a new major version with the new updates to support Drupal versions 10.3 to 11 and revert the changes so previous versions remain supported.

RenderElement and FormElement base plugin classes are deprecated and renamed to RenderElementBase and FormElementBase
#3431452: Rename RenderElement and FormElement plugin abstract classes to RenderElementBase and FormElementBase

Better to update to Drupal ^10.3

Having a smoother update process for old sites.

✅ Released autocomplete_deluxe-2.1.0

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ✅ Release autocomplete_deluxe-2.0.6, autocomplete_deluxe-2.0.7

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

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

sara101 created an issue. See original summary.

rajab natshah’s picture

Title: Release 2.0.5 is not Compatible with Drupal 10.2 » Change the 2.0.x branch to be compatible with Drupal <=10.2
Version: 2.0.5 » 2.0.x-dev
Assigned: Unassigned » rajab natshah

Thanks, Sara, for filing this issue

I agree with your direction

RenderElement and FormElement base plugin classes are deprecated and renamed to RenderElementBase and FormElementBase
#3431452: Rename RenderElement and FormElement plugin abstract classes to RenderElementBase and FormElementBase

Better to update to Drupal ^10.3

Moving with your smoother update process

  • Change the 2.0.x branch to be compatible with Drupal <=10.2 to support a smoother update process
  • Start a new 2.1.x branch to support Drupal ^10.3 || ^11
rajab natshah’s picture

Title: Change the 2.0.x branch to be compatible with Drupal <=10.2 » Change the 2.0.x branch to be compatible with Drupal <=10.2 to support a smoother update process
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

✅ Released autocomplete_deluxe-2.1.0

  • Issue #3475021: Started a new 2.1.x branch to support Drupal ^10.3 || ^11
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

  • rajab natshah committed 436e5b0c on 2.0.x
    Issue #3475001 by sara101: Change the 2.0.x branch to be compatible with...
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Issue summary: View changes
Status: Active » Needs review
Issue tags: +autocomplete_deluxe-2.0.6
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Status: Needs review » Fixed

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

seworthi’s picture

Status: Fixed » Needs work

Version 2.0 will not apply to sites running core 10.2.1 or higher (I'm running 10.2.8) as composer fails. Composer returns
drupal/autocomplete_deluxe 2.0.6 requires drupal/core <=10.2 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.0] but the package is fixed to 10.2.8 (lock file version) by a partial update and that version does not match.

I think the core lock need to be <10.3 to allow any version less than 10.3, ie 10.2.8, but I am not composer expert.

I set it back to needs work, as in current form it will not install.

adrianliegmann’s picture

Status: Needs work » Needs review

Hello,
I have a Drupal site with 10.2.8 version. I updated this module from 2.0.3 to 2.0.5. I can't update the module to 2.0.6 version.

composer require drupal/autocomplete_deluxe:2.0.6
./composer.json has been updated
Running composer update drupal/autocomplete_deluxe
Gathering patches for root package.
> DrupalComposerManaged\ComposerScripts::preUpdate
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/autocomplete_deluxe 2.0.6 -> satisfiable by drupal/autocomplete_deluxe[2.0.6].
    - drupal/autocomplete_deluxe 2.0.6 requires drupal/core <=10.2 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.0] but the package is fixed to 10.2.8 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

With 2.0.5 version still I have the error related with `FormElementBase` class. I created a patch for that. Please read the versions article in composer: https://getcomposer.org/doc/articles/versions.md#wildcard-version-range-

seworthi’s picture

Can we get this released in dev OR 2.0.7? This is cause me not to be able to update sites using this module.

rajab natshah’s picture

Title: Change the 2.0.x branch to be compatible with Drupal <=10.2 to support a smoother update process » Change the 2.0.x branch to be compatible with Drupal <10.3 to support a smoother update process
Issue summary: View changes

Agrees with that.
Thanks for the follow up, MR , and review

rajab natshah’s picture

Issue summary: View changes
Issue tags: +autocomplete_deluxe-2.0.7

Thanks, Adrian and Scott.
✅ Released autocomplete_deluxe-2.0.7

rajab natshah’s picture

Status: Needs review » Fixed

Back to fixed, let it close in 2 weeks, if we did not face any post-release issues.

Status: Fixed » Closed (fixed)

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