Problem/Motivation

Track the work to make Entity Browser Drupal 12 ready. The module is not yet flagged D12-compatible because a few pieces remain, tracked as child issues below. Splitting them keeps each merge request reviewable and lets us land the low-risk preparation first (which already unblocks dependent modules such as #3576977: Fix Drupal 12 deprecations: replace FormElement, renderPlain() and FileSystemInterface::EXISTS_RENAME and paragraphs via the lenient CI allow-list), while the JavaScript and plugin-attribute work proceed independently.

Proposed resolution

Complete the child issues, then flag the module Drupal 12 compatible.

Children:

  1. #3613186: Fix Drupal 12 deprecations: migrate hooks to OOP classes and fix views_data_alter fatal — Migrate hooks to OOP classes and fix the install-blocking D12 fatals (views_data_alter, Request::get(), getDefaultOperations() cacheability), plus FormElementBase and the ^10.3 floor. Preparation only — does not set ^12 in .info.yml.
  2. #3613381: Fix jQuery 4 (Drupal 12) deprecations in JavaScript — JavaScript / jQuery 4 compatibility — .bind()/.unbind() and the shorthand event helpers are removed in jQuery 4 (shipped in Drupal 12); sweep the js/ directory.
  3. #3522955: Use PHP attributes instead of doctrine annotations for plugin type definitions — Plugin attribute support — provide an attribute class for every plugin manager and convert our own plugins (and the core ones we use), in case core enforces the Drupal 12 deprecation requiring plugin managers to support attributes.
  4. <#3615285: Switch dialog events to the native event format (CR 3422670) — witch the dialog events to the native event format (#3422670: Create a new DrupalDialogEvent to replace jQuery-only dialog events). Follow-up to #3613381: Fix jQuery 4 (Drupal 12) deprecations in JavaScript: the merged JS sweep still binds dialog:aftercreate/dialog:beforeclose through jQuery; move them to window.addEventListener().

Remaining tasks

  • Land all three child issues.
  • Only then set core_version_requirement: ... || ^12 and mark the module Drupal 12 compatible.
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

velmir_taky created an issue. See original summary.

velmir_taky’s picture

Issue summary: View changes
velmir_taky’s picture

Issue summary: View changes
berdir’s picture

Note that the jquery issue didn't account for https://www.drupal.org/node/3422670, the jquery dialog events are deprecated and we should switch to the new format fully.

velmir_taky’s picture

Issue summary: View changes
velmir_taky’s picture

Good catch, thanks @berdir - you're right, I missed #3422670 in the first sweep.

velmir_taky’s picture

#3615285: Switch dialog events to the native event format (CR 3422670) is up for review — that should be the last JS piece for D12. Is it mostly down to review of #3613186: Fix Drupal 12 deprecations: migrate hooks to OOP classes and fix views_data_alter fatal and #3522955: Use PHP attributes instead of doctrine annotations for plugin type definitions now, or is there anything else you'd want before flagging ^12? Happy to help wherever's most useful - and I could open a separate plan for full jQuery removal if that's worth tracking.

berdir’s picture

I think I'm fine now with flagging it officially as D12 compatible. There's still a risk that something will break, but we'll deal with it then.

That said, I did break D12 tests because I merged at least one new test that's missing the new attributes, easy to miss that when not always running next major tests.

We can do that as a MR in this issue and then close it.

velmir_taky’s picture

Status: Active » Needs review
velmir_taky’s picture

MR !154 is ready - re-adds the missing attribute to that kernel test and flips ^12. Have a look when you get a chance; anything else you want before we close this out?

  • berdir committed 28be9ee6 on 8.x-2.x authored by velmir_taky
    task: #3613379 Drupal 12 compatibility
    
    By: velmir_taky
    By: berdir
    
berdir’s picture

Status: Needs review » Fixed

Thanks, merged!

By the way, if you use "[#ID]", it will automatically link, show the issue title and status.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

velmir_taky’s picture

Issue summary: View changes