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:
- #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), plusFormElementBaseand the^10.3floor. Preparation only — does not set^12in.info.yml. - #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 thejs/directory. - #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.
- <#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:beforeclosethrough jQuery; move them towindow.addEventListener().
Remaining tasks
- Land all three child issues.
- Only then set
core_version_requirement: ... || ^12and mark the module Drupal 12 compatible.
Issue fork entity_browser-3613379
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
Comment #2
velmir_taky commentedComment #3
velmir_taky commentedComment #4
berdirNote 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.
Comment #5
velmir_taky commentedComment #6
velmir_taky commentedGood catch, thanks @berdir - you're right, I missed #3422670 in the first sweep.
Comment #7
velmir_taky commented#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.Comment #8
berdirI 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.
Comment #10
velmir_taky commentedComment #11
velmir_taky commentedMR !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?Comment #13
berdirThanks, merged!
By the way, if you use "[#ID]", it will automatically link, show the issue title and status.
Comment #15
velmir_taky commented