Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
node system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Mar 2019 at 19:06 UTC
Updated:
11 Sep 2023 at 03:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
claudiu.cristeaPatch.
Comment #4
martin107 commentedThis looks good to me
as a minor point only
messages of the form "deprecated in Drupal 8.7.0 " should be incremented to 8.8.0
Comment #5
claudiu.cristeaFixed in patch and in CR.
Comment #8
hardik_patel_12 commentedRe-rolled against 9.1.x-dev.Kindly review a new patch.
Comment #9
martin107 commentedSorry time has advanced.
"deprecated in Drupal 8.8.0 " should be incremented to 9.1.0"
and also changed to
"and will be removed from Drupal 10"
Comment #12
longwaveNeeds work to update the deprecation.
Comment #13
vsujeetkumar commentedUpdated deprecation, Please have a look.
Comment #15
longwaveThis is the wrong format, it should say "drupal:9.3.0" and "drupal:10.0.0" for the version numbers. The tests will need updating too. I think you also need to use
$this->expectDeprecation()instead of the annotation in the test.Comment #16
claudiu.cristeaSorry, I think we've worked in parallel. The MR also contains #15 and more.
Comment #17
claudiu.cristeaAlso I wonder if we should not move/deprecate MARK_READ, MARK_NEW & MARK_UPDATED constants in this MR. I think yes.
Comment #18
longwaveAgree we should deprecate the constants at the same time. There is an unrelated change to a list() call (PHPStorm does this by itself, annoyingly), otherwise I think this is good to go.
Comment #19
longwaveHiding patches as we are using the MR workflow now.
Comment #20
claudiu.cristeaIn MR since #8:
$this->expectDeprecation()instead of annotation.Comment #21
longwaveThinking again, should all this functionality belong to history.module? It only works when history is enabled - decoupling that is out of scope for this issue, but should the constants belong over there somewhere? If so maybe leave them where they are and defer that to a followup?
Comment #22
claudiu.cristea@longwave, ref. #21:
Yes, it should be there. I was thinking more, trying to understand what a "mark" is:
theme.incandmark.html.twig. That means a 3rd party module can use them for a custom entity type. For this reason I think the constants, the theme definition (seedrupal_common_theme()and template files (mark.twig.html) should live in core. We need to revert the constants deprecation.Issues with moving
node_mark()to History module:NodeListBuilderand just add the mark. However, this seems not possible right now. I don't see any path where the rows produced by an entity list builder handler can be altered. Of, course, there's always the possibility to swap the Node list builder handler class. But this has a cost when multiple modules are doing this: only one of them will win. I've opened #3221351: 3rd-party should be able to alter the EntityListBuilder rows to properly fix this.Fixes:
Comment #23
claudiu.cristeaUpdated title & IS
Comment #24
berdirComment #25
claudiu.cristeaWent with the approach suggested by @Berdir
Comment #26
berdirReviewed the MR.
Comment #27
berdir> @berdir, well, I didn't intend to go with the full refactoring path but I was afraid that simply removing the node_mark() static cache or make it static internal will not satisfy.
I satisfies me :)
As mentioned in the MR, given that history_read_multiple() has a static cache, the performance gain would be absolutely tiny, and considering that this is used only in a single place in core, I think this is fine.
Don't need to untangle the interdependencies between history.module and node.module in this issue.
Comment #29
catchAgreed this is enough here. It's likely the static cache was added to the history function when history was factored out into a module, but just not removed from node_mark at the same time. Opened #3223211: Deprecate node_mark for killing off node_mark() altogether.
Committed 0e9bec3 and pushed to 9.3.x. Thanks!
Comment #31
quietone commentedPublished the CR