Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: https://api.drupal.org/api/drupal/core%21modules%21taxonomy%21src%21Term...
TermStorage::loadTree() doesn't document what the return array is keyed by.
Issue fork drupal-3058409
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
init90Looks like loadTree() always return numeric (indexed) an array. In that case 'keyed by' indication seems unneeded.
Comment #3
joachim CreditAttribution: joachim commentedMost of the load() or loadFoo() methods on entity storage handlers are keyed by entity ID, so this should say its numerically-indexed array so developers don't make an incorrect assumption.
Comment #9
guilhermevp CreditAttribution: guilhermevp at CI&T commentedComment #11
guilhermevp CreditAttribution: guilhermevp at CI&T commentedSending MR, please review!
Should this be tagged under bug smash initiative?
Comment #12
joachim CreditAttribution: joachim as a volunteer commentedPerfect, thanks!
Comment #13
quietone CreditAttribution: quietone at PreviousNext commentedSorry, wee grammar error.
Comment #14
joachim CreditAttribution: joachim at Factorial GmbH commentedI'd say "numerically indexed" to avoid ambiguity. Searching core shows that phrase is used quite often.
Comment #16
andregp CreditAttribution: andregp at CI&T commentedMoving to RTBC for the following reasons.
- The change is simple and looks fine.
- @joachim already RTBCed this on #12
- The small correction asked by @quietone on #13 was correctly fixed in #15
Comment #17
quietone CreditAttribution: quietone at PreviousNext commentedThis will need a 10.0.x branch. I tried to change it in GitLab but it needs to be rebased.
Comment #19
joachim CreditAttribution: joachim as a volunteer commentedDone!
The git command to use for this is:
> git rebase --onto 10.0.x 9.4.x
which means 'snip at 9.4.x and then stick onto 10.0.x'
Comment #22
catchCommitted/pushed to 10.0.x and backported through to 9.3.x, thanks!