Problem/Motivation
See #3566536: [meta] eliminate core .module files
Usage in core & contrib: https://git.drupalcode.org/search?group_id=2&scope=blobs&search=editor_i...
Proposed resolution
Deprecate and move to a trait EDIT: It was decided to move the logic to a new service.
Remaining tasks
None.
User interface changes
None.
Introduced terminology
None.
API changes
editor_image_upload_settings_form() is deprecated. Its logic is move to a service.
Data model changes
None.
Issue fork drupal-3570917
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 #3
claudiu.cristeaReady for review
Comment #4
dcam commentedThe existing changes look good, but there are some additional
@see editor_image_upload_settings_form()references in Core that I assume should be updated. These were found withgrep -r "editor_image_upload_settings_form" core.Comment #5
nicxvan commentedDoes this need to be a trait or can we just move the code into the form where it's used?
That test is really weird that it calls the function too.
Comment #6
claudiu.cristea@nicxvan,
The original function description states:
My understanding is that we have here a reusable piece of code which is supposed to be used not only by CKEditor5 but it's also offered to any 3rd-party provided editor.
@dcam,
Replaced the rest of occurrences
Comment #7
smustgrave commentedPure some of the other ones should this be a service instead so services can be injected
Comment #8
smustgrave commentedThinking maybe this needs to be a service like what was done on #3572339: Modernize locale.fetch.inc and #3568387: Move text_summary to TextSummary service and deprecate
Comment #9
nicxvan commentedI agree it should be a service since it itself uses services and based on discussions in slack adding services to traits is very complex and not at all solved.
The unfortunate thing here is that it's only really used by one thing, but it's also duplicated in a test.
Comment #10
nod_Humbly suggesting a better search link: https://search.tresbien.tech/search?q=editor_image_upload_settings_form&...
Comment #11
claudiu.cristeaComment #12
claudiu.cristeaComment #13
claudiu.cristeaComment #14
claudiu.cristeaReady for review
Comment #15
nicxvan commentedThis looks much better!
One trivial comment on the file deprecation notice.
I think this is nearly ready.
Comment #16
nicxvan commentedLooks good I think this is ready!
Comment #19
godotislateCommitted 4a57d7b and pushed to main. Thanks!
Did not apply to 11.x, so need a separate MR for that.
Comment #21
claudiu.cristeaOpened MR 15096 which is green. Please review
@godotislate, as a side note: the
mainwas merged but the BC layer of deprecation of the constructor addition, with removal in Drupal 12 was not removed before merge. See https://git.drupalcode.org/project/drupal/-/commit/4a57d7b3ce085ad59f747.... Not sure exactly what is the rule, but some core committers are either removing themselves or ask for separate MRs. Should we open an issue to remove the BC layer inmain?Comment #22
godotislateThat's what we did for #3555534: Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor instead. and #3569092: Update method signatures for addConstraint() and ConstraintManager::create() and remove HasNamedArguments use, but let me see if we need consensus on process for this.
Comment #23
smustgrave commentedWill say I’ve been doing a lot of the deprecation removal for D12. Have most of it done minus a handful of tickets. I have a final ticket to get anything missed or new stuff so if it’s simple I’m happy to roll into that.
Comment #24
nicxvan commentedThe backport is good, I think we just get as many of the .module deprecations in as we can then we do one big follow up to clean up the ones we got in.
Comment #27
larowlanBackported to 11.x - thanks
Comment #29
larowlanLooks like I committed the wrong thing here
Comment #31
longwaveCommitted and pushed 87b75b4da77 to 11.x. Thanks!